From 5dbe7866e80b5a2c4c15ec10beddf14775bb80eb Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 30 Aug 2015 20:57:59 +0200 Subject: [PATCH] Fix distance calculator --- .../plus/distancecalculator/DistanceCalculatorPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java index 0d9a9c5424..003c4dca6e 100644 --- a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java +++ b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java @@ -99,6 +99,9 @@ public class DistanceCalculatorPlugin extends OsmandPlugin { @Override public void updateLayers(OsmandMapTileView mapView, MapActivity activity) { if(isActive()) { + if(distanceCalculatorLayer == null) { + registerLayers(activity); + } if(!mapView.isLayerVisible(distanceCalculatorLayer)) { activity.getMapView().addLayer(distanceCalculatorLayer, 4.5f); }