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
public void registerLayers(MapActivity activity) {
if(parkingLayer == null) {
parkingLayer = new ParkingPositionLayer(activity);
activity.getMapView() .addLayer(parkingLayer, 5);
// remove old if existing after turn
if(parkingLayer != null) {
activity.getMapView().removeLayer(parkingLayer);
}
parkingLayer = new ParkingPositionLayer(activity);
activity.getMapView().addLayer(parkingLayer, 4.5f);
registerWidget(activity);
}