Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #5906 - corrected mapview method registrations
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen authored and tobrun committed Sep 14, 2016
1 parent b07a2b7 commit cb6a089
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions platform/android/src/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit cb6a089

Please sign in to comment.