[android] - save debug cache state vs map state
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user