[android] do not clear native layers and sources when style is reloading

This prevents unnecessary layers blink when the same components are re-added after the style reload.
This commit is contained in:
Łukasz Paczos
2019-08-28 16:44:02 +02:00
committed by Łukasz Paczos
parent 6998e9a8ed
commit 6a4e431dbe
3 changed files with 1 additions and 21 deletions

View File

@@ -1182,7 +1182,6 @@ public final class LocationComponent {
}
isLayerReady = false;
locationLayerController.hide();
staleStateManager.onStop();
if (compassEngine != null) {
updateCompassListenerState(false);
@@ -1289,6 +1288,7 @@ public final class LocationComponent {
private void disableLocationComponent() {
isEnabled = false;
locationLayerController.hide();
onLocationLayerStop();
}

View File

@@ -523,14 +523,12 @@ public class Style {
for (Layer layer : layers.values()) {
if (layer != null) {
layer.setDetached();
nativeMap.removeLayer(layer);
}
}
for (Source source : sources.values()) {
if (source != null) {
source.setDetached();
nativeMap.removeSource(source);
}
}