diff options
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 | 237 |
1 files changed, 0 insertions, 237 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 d9ee460ec1..c0c870c2c3 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 @@ -6,7 +6,6 @@ import android.graphics.PointF; import android.graphics.RectF; import android.os.Bundle; import android.support.annotation.FloatRange; -import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.Size; @@ -21,7 +20,6 @@ import com.mapbox.android.gestures.ShoveGestureDetector; import com.mapbox.android.gestures.StandardScaleGestureDetector; import com.mapbox.geojson.Feature; import com.mapbox.geojson.Geometry; -import com.mapbox.mapboxsdk.MapStrictMode; import com.mapbox.mapboxsdk.annotations.Annotation; import com.mapbox.mapboxsdk.annotations.BaseMarkerOptions; import com.mapbox.mapboxsdk.annotations.Marker; @@ -34,17 +32,12 @@ import com.mapbox.mapboxsdk.camera.CameraPosition; import com.mapbox.mapboxsdk.camera.CameraUpdate; import com.mapbox.mapboxsdk.camera.CameraUpdateFactory; import com.mapbox.mapboxsdk.constants.MapboxConstants; -import com.mapbox.mapboxsdk.maps.Style; import com.mapbox.mapboxsdk.geometry.LatLng; import com.mapbox.mapboxsdk.geometry.LatLngBounds; import com.mapbox.mapboxsdk.location.LocationComponent; import com.mapbox.mapboxsdk.log.Logger; import com.mapbox.mapboxsdk.style.expressions.Expression; -import com.mapbox.mapboxsdk.style.layers.Layer; -import com.mapbox.mapboxsdk.style.light.Light; -import com.mapbox.mapboxsdk.style.sources.Source; -import java.util.HashMap; import java.util.List; /** @@ -241,222 +234,6 @@ public final class MapboxMap { return nativeMapView.getPrefetchesTiles(); } - /** - * Retrieve all the layers in the style - * - * @return all the layers in the current style - */ - @NonNull - public List<Layer> getLayers() { - return nativeMapView.getLayers(); - } - - /** - * Get the layer by id - * - * @param layerId the layer's id - * @return the layer, if present in the style - */ - @Nullable - public Layer getLayer(@NonNull String layerId) { - return nativeMapView.getLayer(layerId); - } - - /** - * Tries to cast the Layer to T, throws ClassCastException if it's another type. - * - * @param layerId the layer id used to look up a layer - * @param <T> the generic attribute of a Layer - * @return the casted Layer, null if another type - */ - @Nullable - public <T extends Layer> T getLayerAs(@NonNull String layerId) { - // noinspection unchecked - return (T) nativeMapView.getLayer(layerId); - } - - /** - * 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 - */ - public void addLayer(@NonNull Layer layer) { - nativeMapView.addLayer(layer); - } - - /** - * 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 below the layer id to add this layer before - */ - public void addLayerBelow(@NonNull Layer layer, @NonNull String below) { - nativeMapView.addLayerBelow(layer, below); - } - - /** - * 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 above the layer id to add this layer above - */ - public void addLayerAbove(@NonNull Layer layer, @NonNull String above) { - nativeMapView.addLayerAbove(layer, above); - } - - /** - * Adds the layer to the map at the specified index. The layer must be newly - * created and not added to the map before - * - * @param layer the layer to add - * @param index the index to insert the layer at - */ - public void addLayerAt(@NonNull Layer layer, @IntRange(from = 0) int index) { - nativeMapView.addLayerAt(layer, index); - } - - /** - * Removes the layer. The reference is re-usable after this and can be re-added - * - * @param layerId the layer to remove - * @return true if the layer was successfully removed, false - otherwise - */ - public boolean removeLayer(@NonNull String layerId) { - return nativeMapView.removeLayer(layerId); - } - - /** - * Removes the layer. The reference is re-usable after this and can be re-added - * - * @param layer the layer to remove - * @return true if the layer was successfully removed, false - otherwise - */ - public boolean removeLayer(@NonNull Layer layer) { - return nativeMapView.removeLayer(layer); - } - - /** - * Removes the layer. Any other references to the layer become invalid and should not be used anymore - * - * @param index the layer index - * @return true if the layer was successfully removed, false - otherwise - */ - public boolean 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 - */ - @NonNull - public List<Source> getSources() { - return nativeMapView.getSources(); - } - - /** - * Retrieve a source by id - * - * @param sourceId the source's id - * @return the source if present in the current style - */ - @Nullable - public Source getSource(@NonNull String sourceId) { - return nativeMapView.getSource(sourceId); - } - - /** - * Tries to cast the Source to T, returns null if it's another type. - * - * @param sourceId the id used to look up a layer - * @param <T> the generic type of a Source - * @return the casted Source, null if another type - */ - @Nullable - public <T extends Source> T getSourceAs(@NonNull String sourceId) { - try { - // noinspection unchecked - return (T) nativeMapView.getSource(sourceId); - } catch (ClassCastException exception) { - String message = String.format("Source: %s is a different type: ", sourceId); - Logger.e(TAG, message, exception); - MapStrictMode.strictModeViolation(message, exception); - return null; - } - } - - /** - * Adds the source to the map. The source must be newly created and not added to the map before - * - * @param source the source to add - */ - public void addSource(@NonNull Source source) { - nativeMapView.addSource(source); - } - - /** - * Removes the source, preserving the reference for re-use - * - * @param sourceId the source to remove - * @return true if the source was successfully removed, false - otherwise - */ - public boolean removeSource(@NonNull String sourceId) { - return nativeMapView.removeSource(sourceId); - } - - /** - * Removes the source, preserving the reference for re-use - * - * @param source the source to remove - * @return true if the source was successfully removed, false - otherwise - */ - public boolean removeSource(@NonNull Source source) { - return nativeMapView.removeSource(source); - } - - /** - * Adds an image to be used in the map's style - * - * @param name the name of the image - * @param image the pre-multiplied Bitmap - */ - public void addImage(@NonNull String name, @NonNull Bitmap image) { - addImage(name, image, false); - } - - /** - * Adds an image to be used in the map's style - * - * @param name the name of the image - * @param image the pre-multiplied Bitmap - * @param sdf the flag indicating image is an SDF or template image - */ - public void addImage(@NonNull String name, @NonNull Bitmap image, boolean sdf) { - nativeMapView.addImage(name, image, sdf); - } - - /** - * Adds an images to be used in the map's style - */ - public void addImages(@NonNull HashMap<String, Bitmap> images) { - nativeMapView.addImages(images); - } - - /** - * Removes an image from the map's style - * - * @param name the name of the image to remove - */ - public void removeImage(@NonNull String name) { - nativeMapView.removeImage(name); - } - - @Nullable - public Bitmap getImage(@NonNull String name) { - return nativeMapView.getImage(name); - } - // // MinZoom // @@ -544,20 +321,6 @@ public final class MapboxMap { } // - // Light - // - - /** - * Get the global light source used to change lighting conditions on extruded fill layers. - * - * @return the global light source - */ - @NonNull - public Light getLight() { - return nativeMapView.getLight(); - } - - // // Camera API // |