Remove source functions
This commit is contained in:
@@ -242,35 +242,6 @@ void JNICALL nativeCleanup(JNIEnv* env, jobject obj, jlong native_map_view_ptr)
|
||||
native_map_view->getMap()->cleanup();
|
||||
}
|
||||
|
||||
// TODO remove these?
|
||||
void JNICALL nativeAddDefaultSource(JNIEnv* env, jobject obj, jlong native_map_view_ptr) {
|
||||
VERBOSE("nativeAddDefaultSource");
|
||||
ASSERT(native_map_view_ptr != 0);
|
||||
// NativeMapView* native_map_view = reinterpret_cast<NativeMapView*>(native_map_view_ptr);
|
||||
// native_map_view->getMap()->addDefaultSource();
|
||||
}
|
||||
|
||||
void JNICALL nativeRemoveDefaultSource(JNIEnv* env, jobject obj, jlong native_map_view_ptr) {
|
||||
VERBOSE("nativeRemoveDefaultSource");
|
||||
ASSERT(native_map_view_ptr != 0);
|
||||
// NativeMapView* native_map_view = reinterpret_cast<NativeMapView*>(native_map_view_ptr);
|
||||
// native_map_view->getMap()->removeDefaultSource();
|
||||
}
|
||||
|
||||
void JNICALL nativeAddSource(JNIEnv* env, jobject obj, jlong native_map_view_ptr, jstring name, jstring url) {
|
||||
VERBOSE("nativeAddSource");
|
||||
ASSERT(native_map_view_ptr != 0);
|
||||
// NativeMapView* native_map_view = reinterpret_cast<NativeMapView*>(native_map_view_ptr);
|
||||
// native_map_view->getMap()->addSource(std_string_from_jstring(env, name), std_string_from_jstring(env, url));
|
||||
}
|
||||
|
||||
void JNICALL nativeRemoveSource(JNIEnv* env, jobject obj, jlong native_map_view_ptr, jstring name) {
|
||||
VERBOSE("nativeRemoveSource");
|
||||
ASSERT(native_map_view_ptr != 0);
|
||||
// NativeMapView* native_map_view = reinterpret_cast<NativeMapView*>(native_map_view_ptr);
|
||||
// native_map_view->getMap()->removeSource(std_string_from_jstring(env, name));
|
||||
}
|
||||
|
||||
void JNICALL nativeResize(JNIEnv* env, jobject obj, jlong native_map_view_ptr, jint width, jint height, jfloat ratio) {
|
||||
VERBOSE("nativeResize");
|
||||
ASSERT(native_map_view_ptr != 0);
|
||||
@@ -734,10 +705,6 @@ extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
{ "nativeRerender", "(J)V", reinterpret_cast<void*>(&nativeRerender) },
|
||||
{ "nativeUpdate", "(J)V", reinterpret_cast<void*>(&nativeUpdate) },
|
||||
{ "nativeCleanup", "(J)V", reinterpret_cast<void*>(&nativeCleanup) },
|
||||
{ "nativeAddDefaultSource", "(J)V", reinterpret_cast<void*>(&nativeAddDefaultSource) },
|
||||
{ "nativeRemoveDefaultSource", "(J)V", reinterpret_cast<void*>(&nativeRemoveDefaultSource) },
|
||||
{ "nativeAddSource", "(JLjava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(&nativeAddSource) },
|
||||
{ "nativeRemoveSource", "(JLjava/lang/String;)V", reinterpret_cast<void*>(&nativeRemoveSource) },
|
||||
{ "nativeResize", "(JIIF)V", reinterpret_cast<void*>(static_cast<void JNICALL(*)(JNIEnv*,jobject,jlong,jint,jint,jfloat)>(&nativeResize)) },
|
||||
{ "nativeResize", "(JIIFII)V", reinterpret_cast<void*>(static_cast<void JNICALL(*)(JNIEnv*,jobject,jlong,jint,jint,jfloat,jint,jint)>(&nativeResize)) },
|
||||
{ "nativeSetAppliedClasses", "(JLjava/util/Set;)V", reinterpret_cast<void*>(&nativeSetAppliedClasses) },
|
||||
|
||||
@@ -127,9 +127,6 @@ public class MapView extends SurfaceView {
|
||||
|
||||
// Create the NativeMapView
|
||||
mNativeMapView = new NativeMapView(this, mDefaultStyleJSON);
|
||||
mNativeMapView.addDefaultSource();
|
||||
// mNativeMapView.addSource("countries",
|
||||
// "http://192.168.20.103/%d/%d/%d.pbf");
|
||||
|
||||
// Load the attributes
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs,
|
||||
|
||||
@@ -92,22 +92,6 @@ class NativeMapView {
|
||||
nativeCleanup(mNativeMapViewPtr);
|
||||
}
|
||||
|
||||
public void addDefaultSource() {
|
||||
nativeAddDefaultSource(mNativeMapViewPtr);
|
||||
}
|
||||
|
||||
public void removeDefaultSource() {
|
||||
nativeRemoveDefaultSource(mNativeMapViewPtr);
|
||||
}
|
||||
|
||||
public void addSource(String name, String url) {
|
||||
nativeAddSource(mNativeMapViewPtr, name, url);
|
||||
}
|
||||
|
||||
public void removeSource(String name) {
|
||||
nativeRemoveSource(mNativeMapViewPtr, name);
|
||||
}
|
||||
|
||||
public void resize(int width, int height) {
|
||||
resize(width, height, 1.0f);
|
||||
}
|
||||
@@ -402,15 +386,6 @@ class NativeMapView {
|
||||
|
||||
private native void nativeCleanup(long nativeMapViewPtr);
|
||||
|
||||
private native void nativeAddDefaultSource(long nativeMapViewPtr);
|
||||
|
||||
private native void nativeRemoveDefaultSource(long nativeMapViewPtr);
|
||||
|
||||
private native void nativeAddSource(long nativeMapViewPtr, String name,
|
||||
String url);
|
||||
|
||||
private native void nativeRemoveSource(long nativeMapViewPtr, String name);
|
||||
|
||||
private native void nativeResize(long nativeMapViewPtr, int width,
|
||||
int height, float ratio);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user