Fix distance calculator

This commit is contained in:
Victor Shcherb 2015-08-30 20:57:59 +02:00
parent fc3403af78
commit 5dbe7866e8

View file

@ -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);
} }