summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2018-12-21 14:01:32 +0100
committerTobrun <tobrun@mapbox.com>2019-01-02 10:20:09 +0100
commit2c19356ae6537b42e90db8c77cf317b53f628c4f (patch)
tree1589aee83b2a8e5124934f05cb6fc507659c422f
parentd3bb518976a8d99c36c627e5be907065497dfa58 (diff)
downloadqtlocation-mapboxgl-2c19356ae6537b42e90db8c77cf317b53f628c4f.tar.gz
[android] - save debug cache state vs map state
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java8
1 files changed, 6 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 a94bc0874b..dcd40326aa 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
@@ -75,6 +75,8 @@ public final class MapboxMap {
@Nullable
private Style style;
+ private boolean debugActive;
+
MapboxMap(NativeMapView map, Transform transform, UiSettings ui, Projection projection,
OnGesturesManagerInteractionListener listener, CameraChangeDispatcher cameraChangeDispatcher) {
this.nativeMapView = map;
@@ -145,7 +147,7 @@ public final class MapboxMap {
*/
void onSaveInstanceState(@NonNull Bundle outState) {
outState.putParcelable(MapboxConstants.STATE_CAMERA_POSITION, transform.getCameraPosition());
- outState.putBoolean(MapboxConstants.STATE_DEBUG_ACTIVE, nativeMapView.getDebug());
+ outState.putBoolean(MapboxConstants.STATE_DEBUG_ACTIVE, isDebugActive());
uiSettings.onSaveInstanceState(outState);
}
@@ -696,7 +698,7 @@ public final class MapboxMap {
* @return If true, map debug information is currently shown.
*/
public boolean isDebugActive() {
- return nativeMapView.getDebug();
+ return debugActive;
}
/**
@@ -708,6 +710,7 @@ public final class MapboxMap {
* @param debugActive If true, map debug information is shown.
*/
public void setDebugActive(boolean debugActive) {
+ this.debugActive = debugActive;
nativeMapView.setDebug(debugActive);
}
@@ -722,6 +725,7 @@ public final class MapboxMap {
*/
public void cycleDebugOptions() {
nativeMapView.cycleDebugOptions();
+ this.debugActive = nativeMapView.getDebug();
}
//