Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public void removeOnLocationStaleListener(@NonNull OnLocationStaleListener liste
@RequiresPermission(anyOf = {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION})
@OnLifecycleEvent(Lifecycle.Event.ON_START)
public void onStart() {
onLocationLayerStart();
enableLocationLayerPlugin();
if (isEnabled) {
mapView.addOnMapChangedListener(onMapChangedListener);
}
Expand All @@ -429,7 +429,7 @@ public void onStart() {
*/
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
public void onStop() {
onLocationLayerStop();
disableLocationLayerPlugin();
mapView.removeOnMapChangedListener(onMapChangedListener);
}

Expand Down Expand Up @@ -515,7 +515,7 @@ private void updateMapWithOptions(final LocationLayerOptions options) {
* @since 0.1.0
*/
private void updateLocation(final Location location) {
if (location == null) {
if (location == null || !isEnabled) {
return;
}
staleStateManager.updateLatestLocationTime();
Expand Down