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 committed Aug 17, 2016
1 parent 305b761 commit c456d32
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 @@ -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 {
Expand Down Expand Up @@ -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;

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 @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit c456d32

Please sign in to comment.