summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index edd93f6ae7..34cc2ed59e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -73,7 +73,8 @@ import static com.mapbox.mapboxsdk.maps.widgets.CompassView.TIME_WAIT_IDLE;
* </p>
* <p>
* If you are planning on using multiple MapView instances in one lifecycle
- * you have to specify a unique ID for each instance with {@link MapboxMapOptions#setMapId(String)} or in xml attributes.
+ * you have to specify a unique ID for each instance with {@link MapboxMapOptions#setMapId(String)}
+ * or in the xml attributes.
* </p>
* <p>
* Use of {@code MapView} requires a Mapbox API access token.
@@ -141,8 +142,8 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
}
if (!(context instanceof FragmentActivity)) {
- throw new IllegalArgumentException("You need to instantiate MapView from FragmentActivity context. " +
- "If your LayoutInflater works with a different context try creating MapView programmatically.");
+ throw new IllegalArgumentException("You need to instantiate MapView from FragmentActivity context. "
+ + "If your LayoutInflater works with a different context try creating MapView programmatically.");
}
mapboxMapOptions = options;
@@ -435,7 +436,9 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
destroyed = true;
onMapChangedListeners.clear();
mapCallback.clearOnMapReadyCallbacks();
- uiSettings.onMapDestroy();
+
+ uiSettings.onMapDestroy(getContext());
+ mapSettings.onMapDestroy(getContext());
if (nativeMapView != null && hasSurface) {
// null when destroying an activity programmatically mapbox-navigation-android/issues/503