From c456d32be6be3d93d238327c47ce03e24532380f 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 2b27b116699..314c9359092 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 @@ -504,7 +504,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 { @@ -719,7 +719,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 ac89dcf3350..472f1af6533 100755 --- a/platform/android/src/jni.cpp +++ b/platform/android/src/jni.cpp @@ -1189,7 +1189,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); @@ -1209,7 +1209,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);