Try to fix parking

This commit is contained in:
Victor Shcherb 2012-10-02 21:35:46 +02:00
parent 3f934821ad
commit 33cfc8567e

View file

@ -78,10 +78,12 @@ public class ParkingPositionPlugin extends OsmandPlugin {
@Override @Override
public void registerLayers(MapActivity activity) { public void registerLayers(MapActivity activity) {
if(parkingLayer == null) { // remove old if existing after turn
parkingLayer = new ParkingPositionLayer(activity); if(parkingLayer != null) {
activity.getMapView() .addLayer(parkingLayer, 5); activity.getMapView().removeLayer(parkingLayer);
} }
parkingLayer = new ParkingPositionLayer(activity);
activity.getMapView().addLayer(parkingLayer, 4.5f);
registerWidget(activity); registerWidget(activity);
} }