From cb6a0897293092586811e612cd01edc1dd6440e4 Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Wed, 17 Aug 2016 19:22:26 +0200 Subject: [PATCH] [android] #5906 - corrected mapview method registrations --- .../main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java | 4 ++-- platform/android/src/jni.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java index 8066da671ee..90dde6e08b6 100755 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java @@ -499,7 +499,7 @@ public Source getSource(@NonNull String sourceId) { } public void addSource(@NonNull Source source) { - nativeAddSource(mNativeMapViewPtr, source.getId(), source); + nativeAddSource(mNativeMapViewPtr, source.getNativePtr()); } public void removeSource(@NonNull String sourceId) throws NoSuchSourceException { @@ -714,7 +714,7 @@ private native void nativeSetVisibleCoordinateBounds(long mNativeMapViewPtr, Lat private native Source nativeGetSource(long nativeMapViewPtr, String sourceId); - private native void nativeAddSource(long nativeMapViewPtr, String id, Source source); + private native void nativeAddSource(long nativeMapViewPtr, long nativeSourcePtr); private native void nativeRemoveSource(long nativeMapViewPtr, String sourceId) throws NoSuchSourceException; diff --git a/platform/android/src/jni.cpp b/platform/android/src/jni.cpp index 77eb7d4e083..dd83d3cbf08 100755 --- a/platform/android/src/jni.cpp +++ b/platform/android/src/jni.cpp @@ -1179,7 +1179,7 @@ void nativeRemoveLayer(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, j } } -jni::jobject* nativeGetSource(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jni::jstring* sourceId) { +jni::jobject* nativeGetSource(JNIEnv *env, jni::jobject* obj, jni::jlong nativeMapViewPtr, jni::jstring* sourceId) { mbgl::Log::Debug(mbgl::Event::JNI, "nativeGetSource"); assert(env); @@ -1199,7 +1199,7 @@ jni::jobject* nativeGetSource(JNIEnv *env, jni::jobject* obj, jlong nativeMapVie return createJavaSourcePeer(*env, nativeMapView->getMap(), *coreSource); } -void nativeAddSource(JNIEnv *env, jni::jobject* obj, jlong nativeMapViewPtr, jlong nativeSourcePtr) { +void nativeAddSource(JNIEnv *env, jni::jobject* obj, jni::jlong nativeMapViewPtr, jni::jlong nativeSourcePtr) { mbgl::Log::Debug(mbgl::Event::JNI, "nativeAddSource"); assert(nativeMapViewPtr != 0); assert(nativeSourcePtr != 0);