diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src')
5 files changed, 1 insertions, 93 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 d7a61af7eb..3b4db2e62a 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 @@ -92,8 +92,6 @@ public final class MapboxMap { // Map configuration setDebugActive(options.getDebugActive()); setApiBaseUrl(options); - setStyleUrl(options); - setStyleJson(options); setPrefetchesTiles(options); } @@ -851,25 +849,6 @@ public final class MapboxMap { }); } - /** - * Loads a new map style from MapboxMapOptions if available. - * - * @param options the object containing the style url - */ - private void setStyleUrl(@NonNull MapboxMapOptions options) { - String style = options.getStyleUrl(); - if (!TextUtils.isEmpty(style)) { - setStyle(new Style.Builder().fromUrl(style)); - } - } - - private void setStyleJson(@NonNull MapboxMapOptions options) { - String styleJson = options.getStyleJson(); - if (!TextUtils.isEmpty(styleJson)) { - setStyle(new Style.Builder().fromJson(styleJson)); - } - } - // // Annotations // @@ -1839,7 +1818,7 @@ public final class MapboxMap { /** * Returns the {@link LocationComponent} that can be used to display user's location on the map. * <p> - * Use {@link LocationComponent#activateLocationComponent(Context)} or any overload to activate the component, + * Use {@link LocationComponent#activateLocationComponent(Context, Style)} or any overload to activate the component, * then, enable it with {@link LocationComponent#setLocationComponentEnabled(boolean)}. * <p> * You can customize the location icon and more with {@link com.mapbox.mapboxsdk.location.LocationComponentOptions}. diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java index a5a6ede1dd..8c91ad9174 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMapOptions.java @@ -77,9 +77,6 @@ public class MapboxMapOptions implements Parcelable { @ColorInt private int foregroundLoadColor; - private String styleUrl; - private String styleJson; - private float pixelRatio; private boolean crossSourceCollisions = true; @@ -122,8 +119,6 @@ public class MapboxMapOptions implements Parcelable { zoomGesturesEnabled = in.readByte() != 0; doubleTapGesturesEnabled = in.readByte() != 0; - styleUrl = in.readString(); - styleJson = in.readString(); apiBaseUrl = in.readString(); textureMode = in.readByte() != 0; translucentTextureSurface = in.readByte() != 0; @@ -149,8 +144,6 @@ public class MapboxMapOptions implements Parcelable { TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.mapbox_MapView, 0, 0); try { mapboxMapOptions.camera(new CameraPosition.Builder(typedArray).build()); - mapboxMapOptions.styleUrl(typedArray.getString(R.styleable.mapbox_MapView_mapbox_styleUrl)); - mapboxMapOptions.styleJson(typedArray.getString(R.styleable.mapbox_MapView_mapbox_styleJson)); mapboxMapOptions.apiBaseUrl(typedArray.getString(R.styleable.mapbox_MapView_mapbox_apiBaseUrl)); mapboxMapOptions.zoomGesturesEnabled( @@ -267,30 +260,6 @@ public class MapboxMapOptions implements Parcelable { } /** - * Specifies the styleUrl url associated with a map view. - * - * @param styleUrl Url to be used to load a styleUrl - * @return This - */ - @NonNull - public MapboxMapOptions styleUrl(String styleUrl) { - this.styleUrl = styleUrl; - return this; - } - - /** - * Specifies the styleJson associated with a map view. - * - * @param styleJson json to used as style - * @return This - */ - @NonNull - public MapboxMapOptions styleJson(String styleJson) { - this.styleJson = styleJson; - return this; - } - - /** * Specifies the used debug type for a map view. * * @param enabled True is debug is enabled @@ -777,24 +746,6 @@ public class MapboxMapOptions implements Parcelable { } /** - * Get the current configured styleUrl url for a map view. - * - * @return Style url to be used. - */ - public String getStyleUrl() { - return styleUrl; - } - - /** - * Get the current configured styleJson for a map view. - * - * @return Style json to be used. - */ - public String getStyleJson() { - return styleJson; - } - - /** * Get the current configured rotate gesture state for a map view. * * @return True indicates gesture is enabled @@ -972,8 +923,6 @@ public class MapboxMapOptions implements Parcelable { dest.writeByte((byte) (zoomGesturesEnabled ? 1 : 0)); dest.writeByte((byte) (doubleTapGesturesEnabled ? 1 : 0)); - dest.writeString(styleUrl); - dest.writeString(styleJson); dest.writeString(apiBaseUrl); dest.writeByte((byte) (textureMode ? 1 : 0)); dest.writeByte((byte) (translucentTextureSurface ? 1 : 0)); @@ -1061,13 +1010,6 @@ public class MapboxMapOptions implements Parcelable { if (!Arrays.equals(attributionMargins, options.attributionMargins)) { return false; } - if (styleUrl != null ? !styleUrl.equals(options.styleUrl) : options.styleUrl != null) { - return false; - } - - if (styleJson != null ? !styleJson.equals(options.styleJson) : options.styleJson != null) { - return false; - } if (apiBaseUrl != null ? !apiBaseUrl.equals(options.apiBaseUrl) : options.apiBaseUrl != null) { return false; @@ -1122,8 +1064,6 @@ public class MapboxMapOptions implements Parcelable { result = 31 * result + (apiBaseUrl != null ? apiBaseUrl.hashCode() : 0); result = 31 * result + (textureMode ? 1 : 0); result = 31 * result + (translucentTextureSurface ? 1 : 0); - result = 31 * result + (styleUrl != null ? styleUrl.hashCode() : 0); - result = 31 * result + (styleJson != null ? styleJson.hashCode() : 0); result = 31 * result + (prefetchesTiles ? 1 : 0); result = 31 * result + (zMediaOverlay ? 1 : 0); result = 31 * result + (localIdeographFontFamily != null ? localIdeographFontFamily.hashCode() : 0); diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml index 6cf4a8db3c..75943e0aa2 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res-public/values/public.xml @@ -9,8 +9,6 @@ <!-- Exposed attrs.xml --> <!--Configuration--> - <public name="mapbox_styleUrl" type="attr" /> - <public name="mapbox_styleJson" type="attr" /> <public name="mapbox_apiBaseUrl" type="attr" /> <public name="mapbox_localIdeographFontFamily" type="attr" /> <public name="mapbox_cross_source_collisions" type="attr" /> diff --git a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml index 8dac565c22..cb1dff80a1 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml +++ b/platform/android/MapboxGLAndroidSDK/src/main/res/values/attrs.xml @@ -3,8 +3,6 @@ <declare-styleable name="mapbox_MapView"> <!--Configuration--> - <attr name="mapbox_styleUrl" format="string"/> - <attr name="mapbox_styleJson" format="string"/> <attr name="mapbox_apiBaseUrl" format="string"/> <attr name="mapbox_localIdeographFontFamily" format="string"/> <attr name="mapbox_cross_source_collisions" format="boolean"/> diff --git a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java index 0bec0d4502..f03d1fb15f 100644 --- a/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java +++ b/platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/maps/MapboxMapOptionsTest.java @@ -146,13 +146,6 @@ public class MapboxMapOptionsTest { } @Test - public void testStyleUrl() { - assertEquals(Style.DARK, new MapboxMapOptions().styleUrl(Style.DARK).getStyleUrl()); - assertNotEquals(Style.LIGHT, new MapboxMapOptions().styleUrl(Style.DARK).getStyleUrl()); - assertNull(new MapboxMapOptions().getStyleUrl()); - } - - @Test public void testCamera() { CameraPosition position = new CameraPosition.Builder().build(); assertEquals(new CameraPosition.Builder(position).build(), new MapboxMapOptions().camera(position).getCamera()); |