diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-02-24 18:19:04 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-02-28 09:33:04 -0800 |
commit | a9d2929819a5b4268a83e8ccd90eeb0b1f1e2f72 (patch) | |
tree | cc0a0376967e7e7d4f8131c428c86a0d7392f41d /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | |
parent | dc21396d71ea28b736ee6fb3dcd476fed80fbd5d (diff) | |
download | qtlocation-mapboxgl-a9d2929819a5b4268a83e8ccd90eeb0b1f1e2f72.tar.gz |
[android] remove layer at index
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index 9b40685408..3623872a4f 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -8,6 +8,7 @@ import android.location.Location; import android.os.Bundle; import android.os.Handler; import android.support.annotation.FloatRange; +import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.UiThread; @@ -263,7 +264,7 @@ public final class MapboxMap { /** * Adds the layer to the map. The layer must be newly created and not added to the map before * - * @param layer the layer to add + * @param layer the layer to add * @param below the layer id to add this layer before */ @UiThread @@ -274,7 +275,7 @@ public final class MapboxMap { /** * Adds the layer to the map. The layer must be newly created and not added to the map before * - * @param layer the layer to add + * @param layer the layer to add * @param above the layer id to add this layer above */ @UiThread @@ -307,6 +308,18 @@ public final class MapboxMap { } /** + * Removes the layer. Any other references to the layer become invalid and should not be used anymore + * + * @param index the layer index + * @return the removed layer or null if not found + */ + @UiThread + @Nullable + public Layer removeLayerAt(@IntRange(from = 0) int index) { + return nativeMapView.removeLayerAt(index); + } + + /** * Retrieve all the sources in the style * * @return all the sources in the current style |