Fix distance calculator
This commit is contained in:
parent
fc3403af78
commit
5dbe7866e8
1 changed files with 3 additions and 0 deletions
|
@ -99,6 +99,9 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void updateLayers(OsmandMapTileView mapView, MapActivity activity) {
|
public void updateLayers(OsmandMapTileView mapView, MapActivity activity) {
|
||||||
if(isActive()) {
|
if(isActive()) {
|
||||||
|
if(distanceCalculatorLayer == null) {
|
||||||
|
registerLayers(activity);
|
||||||
|
}
|
||||||
if(!mapView.isLayerVisible(distanceCalculatorLayer)) {
|
if(!mapView.isLayerVisible(distanceCalculatorLayer)) {
|
||||||
activity.getMapView().addLayer(distanceCalculatorLayer, 4.5f);
|
activity.getMapView().addLayer(distanceCalculatorLayer, 4.5f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue