[ios, android] Add methods to remove a custom layer
This commit is contained in:
@@ -3792,6 +3792,11 @@ public final class MapView extends FrameLayout {
|
||||
mNativeMapView.addCustomLayer(customLayer, before);
|
||||
}
|
||||
|
||||
@UiThread
|
||||
public void removeCustomLayer(String id) {
|
||||
mNativeMapView.removeCustomLayer(id);
|
||||
}
|
||||
|
||||
@UiThread
|
||||
public void invalidateCustomLayers() {
|
||||
mNativeMapView.update();
|
||||
|
||||
@@ -454,6 +454,10 @@ final class NativeMapView {
|
||||
nativeAddCustomLayer(mNativeMapViewPtr, customLayer, before);
|
||||
}
|
||||
|
||||
public void removeCustomLayer(String id) {
|
||||
nativeRemoveCustomLayer(mNativeMapViewPtr, id);
|
||||
}
|
||||
|
||||
//
|
||||
// Callbacks
|
||||
//
|
||||
@@ -636,4 +640,6 @@ final class NativeMapView {
|
||||
private native double nativeGetTopOffsetPixelsForAnnotationSymbol(long nativeMapViewPtr, String symbolName);
|
||||
|
||||
private native void nativeAddCustomLayer(long nativeMapViewPtr, CustomLayer customLayer, String before);
|
||||
|
||||
private native void nativeRemoveCustomLayer(long nativeMapViewPtr, String id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user