Index: /applications/editors/josm/plugins/CommandLine/build.xml
===================================================================
--- /applications/editors/josm/plugins/CommandLine/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/CommandLine/build.xml	(revision 32329)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9170"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 32328)
+++ /applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 32329)
@@ -369,8 +369,8 @@
                 break;
             case IMAGERYURL:
-                Layer layer = Main.map.mapView.getActiveLayer();
+                Layer layer = Main.getLayerManager().getActiveLayer();
                 if (layer != null) {
                     if (!(layer instanceof ImageryLayer)) {
-                        List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+                        List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
                         if (imageryLayers.size() == 1) {
                             layer = imageryLayers.get(0);
@@ -389,8 +389,8 @@
                 break;
             case IMAGERYOFFSET:
-                Layer olayer = Main.map.mapView.getActiveLayer();
+                Layer olayer = Main.getLayerManager().getActiveLayer();
                 if (olayer != null) {
                     if (!(olayer instanceof ImageryLayer)) {
-                        List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+                        List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
                         if (imageryLayers.size() == 1) {
                             olayer = imageryLayers.get(0);
@@ -597,5 +597,5 @@
                         GpxFilter gpxFilter = new GpxFilter();
                         gpxFilter.initBboxFilter(bbox);
-                        List<GpxLayer> gpxLayers = Main.map.mapView.getLayersOfType(GpxLayer.class);
+                        List<GpxLayer> gpxLayers = Main.getLayerManager().getLayersOfType(GpxLayer.class);
                         for (GpxLayer gpxLayer : gpxLayers) {
                             gpxFilter.addGpxData(gpxLayer.data);
Index: /applications/editors/josm/plugins/CustomizePublicTransportStop/.project
===================================================================
--- /applications/editors/josm/plugins/CustomizePublicTransportStop/.project	(revision 32328)
+++ /applications/editors/josm/plugins/CustomizePublicTransportStop/.project	(revision 32329)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>josmPlugins</name>
+	<name>JOSM-CustomizePublicTransportStop</name>
 	<comment>JavaCC Nature</comment>
 	<projects>
Index: /applications/editors/josm/plugins/DirectUpload/build.xml
===================================================================
--- /applications/editors/josm/plugins/DirectUpload/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/DirectUpload/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="applied JOSM Ticket 4498 (patch by ax) - oauth support for gpx upload (I accidentally committed parts of the path in [24236])"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9314"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java
===================================================================
--- /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java	(revision 32328)
+++ /applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadOsmConnection.java	(revision 32329)
@@ -11,4 +11,5 @@
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.MainLayerManager;
 import org.openstreetmap.josm.io.OsmConnection;
 import org.openstreetmap.josm.io.OsmTransferException;
@@ -49,8 +50,8 @@
     GpxData autoSelectTrace() {
         if (Main.map != null && Main.map.mapView != null) {
-            MapView mv = Main.map.mapView;
+            MainLayerManager lm = Main.getLayerManager();
 //            List<Layer> allLayers = new ArrayList<Layer>(mv.getAllLayersAsList());  // modifiable
             List<Layer> selectedLayers = LayerListDialog.getInstance().getModel().getSelectedLayers();
-            List<GpxLayer> gpxLayersRemaining = mv.getLayersOfType(GpxLayer.class);
+            List<GpxLayer> gpxLayersRemaining = lm.getLayersOfType(GpxLayer.class);
             gpxLayersRemaining.removeAll(selectedLayers);
             GpxLayer traceLayer = null;
@@ -68,12 +69,11 @@
                 }
                 // active layer
-                else if (mv.getActiveLayer() instanceof GpxLayer) {
-                    traceLayer = (GpxLayer) mv.getActiveLayer();
+                else if (lm.getActiveLayer() instanceof GpxLayer) {
+                    traceLayer = (GpxLayer) lm.getActiveLayer();
                 }
             }
 
             if (traceLayer != null) {
-                GpxData data = traceLayer.data;
-                return data;
+                return traceLayer.data;
             }
         }
Index: /applications/editors/josm/plugins/ElevationProfile/build.xml
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/ElevationProfile/build.xml	(revision 32329)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="[josm_elevationprofile]"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9620"/>
+    <property name="plugin.main.version" value="10279"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 32328)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gui/ElevationProfileDialog.java	(revision 32329)
@@ -196,5 +196,5 @@
         MapView.addLayerChangeListener(this);
         if (Main.isDisplayingMapView()) {
-            Layer layer = Main.map.mapView.getActiveLayer();
+            Layer layer = Main.getLayerManager().getActiveLayer();
             if (layer instanceof GpxLayer) {
                 setActiveLayer((GpxLayer) layer);
Index: /applications/editors/josm/plugins/NanoLog/build.xml
===================================================================
--- /applications/editors/josm/plugins/NanoLog/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/NanoLog/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="NanoLog"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9383"/>
+    <property name="plugin.main.version" value="10279"/>
     <property name="plugin.author" value="Ilya Zverev"/>
     <property name="plugin.class" value="nanolog.NanoLogPlugin"/>
Index: /applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java
===================================================================
--- /applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java	(revision 32328)
+++ /applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java	(revision 32329)
@@ -19,5 +19,5 @@
     public static GpxLayer topLayer() {
         // return first found local layer
-        for( Layer layer : Main.map.mapView.getAllLayers() ) {
+        for( Layer layer : Main.getLayerManager().getLayers() ) {
             if( layer instanceof GpxLayer && ((GpxLayer)layer).isLocalFile() )
                 return (GpxLayer)layer;
Index: /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
===================================================================
--- /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 32328)
+++ /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 32329)
@@ -298,5 +298,5 @@
         public void mousePressed( MouseEvent e ) {
             int nearest = nearestEntry(e);
-            if( nearest > 0 && Main.map.mapView.getActiveLayer() == NanoLogLayer.this ) {
+            if( nearest > 0 && Main.getLayerManager().getActiveLayer() == NanoLogLayer.this ) {
                 dragging = nearest;
                 doDrag(e);
Index: /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java
===================================================================
--- /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 32328)
+++ /applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 32329)
@@ -37,5 +37,5 @@
     public void updateMarkers() {
         List<NanoLogEntry> entries = new ArrayList<>();
-        for( NanoLogLayer l : Main.map.mapView.getLayersOfType(NanoLogLayer.class) ) {
+        for( NanoLogLayer l : Main.getLayerManager().getLayersOfType(NanoLogLayer.class) ) {
             entries.addAll(l.getEntries());
         }
Index: /applications/editors/josm/plugins/cadastre-fr/build.xml
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 32329)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="Changed constructor for Plugin"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9759"/>
+    <property name="plugin.main.version" value="10279"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java	(revision 32329)
@@ -576,5 +576,5 @@
     private static void checkLayerDuplicates(WMSLayer wmsLayer) throws DuplicateLayerException {
         if (Main.map != null) {
-            for (Layer l : Main.map.mapView.getAllLayers()) {
+            for (Layer l : Main.getLayerManager().getLayers()) {
                 if (l instanceof WMSLayer && l.getName().equals(wmsLayer.getName()) && (!l.equals(wmsLayer))) {
                     Main.info("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened.");
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java	(revision 32329)
@@ -456,6 +456,6 @@
     public static void addWMSLayer(WMSLayer wmsLayer) {
         if (Main.map != null && Main.map.mapView != null) {
-            int wmsNewLayerPos = Main.map.mapView.getAllLayers().size();
-            for(Layer l : Main.map.mapView.getLayersOfType(WMSLayer.class)) {
+            int wmsNewLayerPos = Main.getLayerManager().getLayers().size();
+            for(Layer l : Main.getLayerManager().getLayersOfType(WMSLayer.class)) {
                 int wmsPos = Main.map.mapView.getLayerPos(l);
                 if (wmsPos < wmsNewLayerPos) wmsNewLayerPos = wmsPos;
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 32329)
@@ -2,6 +2,6 @@
 package cadastre_fr;
 
+import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.I18n.marktr;
 
 import java.awt.event.ActionEvent;
@@ -12,5 +12,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.gui.layer.Layer;
 
 public class MenuActionGrabPlanImage extends JosmAction implements Runnable {
@@ -36,12 +35,12 @@
         if (wmsLayer == null || Main.map == null || Main.map.mapView == null) return;
         if (!rasterImageGeoreferencer.isRunning()) return;
-        for (Layer l : Main.map.mapView.getAllLayersAsList())
-            if (l == wmsLayer)
-                return;
+        if (Main.getLayerManager().containsLayer(wmsLayer))
+        	return;
         JOptionPane.showMessageDialog(Main.parent, tr("Georeferencing interrupted"));
         rasterImageGeoreferencer.actionInterrupted();
     }
 
-    public void actionPerformed(ActionEvent ae) {
+    @Override
+	public void actionPerformed(ActionEvent ae) {
         if (Main.map != null) {
             if (CadastrePlugin.isCadastreProjection()) {
@@ -58,5 +57,6 @@
     }
 
-    public void run() {
+    @Override
+	public void run() {
         // wait until plan image is fully loaded and joined into one single image
         boolean loadedFromCache = downloadWMSPlanImage.waitFinished();
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 32329)
@@ -69,5 +69,5 @@
                     // check if the selected cache is not already displayed
                     if (Main.map != null) {
-                        for (Layer l : Main.map.mapView.getAllLayers()) {
+                        for (Layer l : Main.getLayerManager().getLayers()) {
                             if (l instanceof WMSLayer && l.getName().equals(location)) {
                                 JOptionPane.showMessageDialog(Main.parent, tr("The location {0} is already on screen. Cache not loaded.", filename), tr("Error"), JOptionPane.ERROR_MESSAGE);
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 32329)
@@ -106,5 +106,5 @@
             Main.pref.put("cadastrewms.codeDepartement", codeDepartement);
             if (Main.map != null) {
-                for (Layer l : Main.map.mapView.getAllLayers()) {
+                for (Layer l : Main.getLayerManager().getLayers()) {
                     if (l instanceof WMSLayer && l.getName().equalsIgnoreCase(location)) {
                         return null;
@@ -118,6 +118,6 @@
             CadastrePlugin.addWMSLayer(wmsLayer);
             Main.info("Add new layer with Location:" + inputTown.getText());
-        } else if (existingLayers != null && existingLayers.size() > 0 && Main.map.mapView.getActiveLayer() instanceof WMSLayer) {
-            wmsLayer = (WMSLayer)Main.map.mapView.getActiveLayer();
+        } else if (existingLayers != null && existingLayers.size() > 0 && Main.getLayerManager().getActiveLayer() instanceof WMSLayer) {
+            wmsLayer = (WMSLayer)Main.getLayerManager().getActiveLayer();
         }
 
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 32329)
@@ -41,6 +41,6 @@
     @Override public void enterMode() {
         if (Main.map != null) {
-            if (Main.map.mapView.getActiveLayer() instanceof WMSLayer) {
-                modifiedLayer = (WMSLayer)Main.map.mapView.getActiveLayer();
+            if (Main.getLayerManager().getActiveLayer() instanceof WMSLayer) {
+                modifiedLayer = (WMSLayer)Main.getLayerManager().getActiveLayer();
                 super.enterMode();
                 Main.map.mapView.addMouseListener(this);
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSDownloadAction.java	(revision 32329)
@@ -27,8 +27,8 @@
         ArrayList<WMSLayer> existingWMSlayers = new ArrayList<>();
         if (Main.map != null) {
-            Layer activeLayer = Main.map.mapView.getActiveLayer();
+            Layer activeLayer = Main.getLayerManager().getActiveLayer();
             if (activeLayer instanceof WMSLayer)
                 return (WMSLayer) activeLayer;
-            for (Layer l : Main.map.mapView.getAllLayers()) {
+            for (Layer l : Main.getLayerManager().getLayers()) {
                 if (l instanceof WMSLayer) {
                     existingWMSlayers.add((WMSLayer)l);
Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 32328)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 32329)
@@ -160,5 +160,5 @@
         grabThread.setGrabber(grabber);
         // if it is the first layer, use the communeBBox as grab bbox (and not divided)
-        if (Main.map.mapView.getAllLayers().size() == 1 ) {
+        if (Main.getLayerManager().getLayers().size() == 1 ) {
             final Bounds bounds = this.getCommuneBBox().toBounds();
             GuiHelper.runInEDTAndWait(new Runnable() {
Index: /applications/editors/josm/plugins/gpsblam/build.xml
===================================================================
--- /applications/editors/josm/plugins/gpsblam/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/gpsblam/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!--
Index: /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java
===================================================================
--- /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 32328)
+++ /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 32329)
@@ -27,5 +27,5 @@
     // within given radius of line between given points
     GPSBlamInputData(Point p1, Point p2, int radius) {
-        Collection<Layer> layers = Main.map.mapView.getAllLayers();
+        Collection<Layer> layers = Main.getLayerManager().getLayers();
         for (Layer l : layers) {
             if (l.isVisible() && l instanceof GpxLayer) {
Index: /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java
===================================================================
--- /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java	(revision 32328)
+++ /applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/downloadtask/DownloadXmlBoundsTask.java	(revision 32329)
@@ -73,5 +73,5 @@
             int count = 0;
             if (!Main.isDisplayingMapView()) return 0;
-            for (Layer layer : Main.map.mapView.getAllLayers()) {
+            for (Layer layer : Main.getLayerManager().getLayers()) {
                 if (layer instanceof XmlBoundsLayer) {
                     count++;
@@ -84,5 +84,5 @@
         protected OsmDataLayer getFirstDataLayer() {
             if (!Main.isDisplayingMapView()) return null;
-            for (Layer layer : Main.map.mapView.getAllLayersAsList()) {
+            for (Layer layer : Main.getLayerManager().getLayers()) {
                 if (layer instanceof XmlBoundsLayer)
                     return (XmlBoundsLayer) layer;
Index: /applications/editors/josm/plugins/imagery_offset_db/build.xml
===================================================================
--- /applications/editors/josm/plugins/imagery_offset_db/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/imagery_offset_db/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Imagery Offset Database"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9168"/>
+    <property name="plugin.main.version" value="10279"/>
 	<property name="plugin.canloadatruntime" value="true"/>
 
Index: /applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetTools.java
===================================================================
--- /applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetTools.java	(revision 32328)
+++ /applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetTools.java	(revision 32329)
@@ -30,5 +30,5 @@
         if( Main.map == null || Main.map.mapView == null )
             return null;
-        List<ImageryLayer> layers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+        List<ImageryLayer> layers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
         for( ImageryLayer layer : layers ) {
             String url = layer.getInfo().getUrl();
Index: /applications/editors/josm/plugins/imageryadjust/build.xml
===================================================================
--- /applications/editors/josm/plugins/imageryadjust/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/imageryadjust/build.xml	(revision 32329)
@@ -2,5 +2,5 @@
 <project name="imageryadjust" default="dist" basedir=".">
     <property name="commit.message" value="ImageryAdjust: Adjust while holding shortcut key"/>
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <property name="plugin.author" value="Upliner"/>
Index: /applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java
===================================================================
--- /applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java	(revision 32328)
+++ /applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java	(revision 32329)
@@ -54,5 +54,5 @@
     
     private List<? extends Layer> getVisibleLayers() {
-        List<? extends Layer> all = new ArrayList<Layer>(Main.map.mapView.getLayersOfType(ImageryLayer.class));
+        List<? extends Layer> all = new ArrayList<Layer>(Main.getLayerManager().getLayersOfType(ImageryLayer.class));
         Iterator<? extends Layer> it = all.iterator();
         while (it.hasNext()) {
@@ -76,5 +76,5 @@
             return;
         }
-        List<ImageryLayer> layers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+        List<ImageryLayer> layers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
         if (layers.size() == 1) {
             adjustingLayer = layers.get(0);
@@ -159,5 +159,5 @@
             if (Main.map.mapView == null)
                 return false;
-            return Main.map.mapView.getActiveLayer() == layer;
+            return Main.getLayerManager().getActiveLayer() == layer;
         }
 
@@ -230,5 +230,5 @@
         if (Main.map == null) return false;
         if (Main.map.mapView == null) return false;
-        boolean b = ! Main.map.mapView.getLayersOfType(ImageryLayer.class).isEmpty();
+        boolean b = ! Main.getLayerManager().getLayersOfType(ImageryLayer.class).isEmpty();
         return b;
     }
Index: /applications/editors/josm/plugins/irsrectify/build.xml
===================================================================
--- /applications/editors/josm/plugins/irsrectify/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/irsrectify/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="irsrectify shortcut conflict"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java
===================================================================
--- /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java	(revision 32329)
@@ -74,5 +74,5 @@
             data.data.addPrimitive(way);
             data.data.setSelected(way.getPrimitiveId());
-            frame.mapView.setActiveLayer(data);
+            Main.getLayerManager().setActiveLayer(data);
         }
 
@@ -80,5 +80,5 @@
             if( frame == null || frame.mapView == null )
                 return null;
-            for( Layer l : frame.mapView.getAllLayers() )
+            for( Layer l : Main.getLayerManager().getLayers() )
                 if( l instanceof ImageryLayer )
                     return (ImageryLayer)l;
@@ -90,10 +90,10 @@
                 return null;
 
-            OsmDataLayer l = frame.mapView.getEditLayer();
+            OsmDataLayer l = Main.getLayerManager().getEditLayer();
             if( isOffsetLayer(l) )
                 return l;
 
             // try to find among all layers
-            for( Layer layer : frame.mapView.getAllLayers() )
+            for( Layer layer : Main.getLayerManager().getLayers() )
                 if( layer instanceof OsmDataLayer && isOffsetLayer((OsmDataLayer)layer) )
                     return (OsmDataLayer) layer;
Index: /applications/editors/josm/plugins/junctionchecking/build.xml
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/junctionchecking/build.xml	(revision 32329)
@@ -3,5 +3,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7575"/>
+    <property name="plugin.main.version" value="10279"/>
     
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 32328)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 32329)
@@ -65,5 +65,5 @@
         //Prüfen, ob der ausgewählte Layer ein OSMDataLayer ist
         if (Main.map == null
-                || !Main.map.isVisible() || !(Main.map.mapView.getActiveLayer() instanceof OsmDataLayer)) {
+                || !Main.map.isVisible() || !(Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)) {
             JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer"));
             return;
@@ -84,5 +84,5 @@
         OSMGraph graph = new OSMGraph();
         //Der vom Benutzer in JOSM ausgewählte, zur Zeit aktive Layer wird der PLugin-OSM-Layer
-        plugin.setOsmlayer((OsmDataLayer)Main.map.mapView.getActiveLayer());
+        plugin.setOsmlayer((OsmDataLayer)Main.getLayerManager().getActiveLayer());
         Iterator<Node> it = Main.main.getCurrentDataSet().getNodes().iterator();
         while (it.hasNext()) {
@@ -147,5 +147,5 @@
         Main.map.selectMapMode(plugin.getJcMapMode());
         Main.main.addLayer(plugin.getChannelDigraphLayer());
-        Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
+        Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer());
     }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 32328)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 32329)
@@ -91,5 +91,5 @@
             plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
         }
-        Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
+        Main.getLayerManager().setActiveLayer(plugin.getChannelDigraphLayer());
     }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 32328)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 32329)
@@ -42,5 +42,5 @@
             }
         }
-        Main.map.mapView.setActiveLayer(plugin.getOsmlayer());
+        Main.getLayerManager().setActiveLayer(plugin.getOsmlayer());
         plugin.getOsmlayer().data.setSelected(ways);
 
Index: /applications/editors/josm/plugins/mapdust/build.xml
===================================================================
--- /applications/editors/josm/plugins/mapdust/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/mapdust/build.xml	(revision 32329)
@@ -3,5 +3,5 @@
     <!-- properties -->
     <property name="commit.message" value="MapDust bug reporter plugin"/>
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
     <property name="apidoc.dir" value="doc"/>
 
Index: /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 32329)
@@ -363,5 +363,5 @@
             if (event.getButton() == MouseEvent.BUTTON1) {
                 if (event.getClickCount() == 2 && !event.isConsumed()) {
-                    if (Main.map.mapView.getActiveLayer() == getMapdustLayer()) {
+                    if (Main.getLayerManager().getActiveLayer() == getMapdustLayer()) {
                         /* show add bug dialog */
                         MapdustBug bug = mapdustGUI.getSelectedBug();
@@ -620,10 +620,5 @@
      */
     private boolean containsMapdustLayer() {
-        boolean contains = false;
-        List<Layer> all = Main.map.mapView.getAllLayersAsList();
-        if (mapdustLayer != null && all.contains(mapdustLayer)) {
-            contains = true;
-        }
-        return contains;
+        return mapdustLayer != null && Main.getLayerManager().containsLayer(mapdustLayer);
     }
 
Index: /applications/editors/josm/plugins/mapillary/gradle.properties
===================================================================
--- /applications/editors/josm/plugins/mapillary/gradle.properties	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/gradle.properties	(revision 32329)
@@ -5,5 +5,5 @@
 plugin.icon=images/icon24.png
 plugin.link=https://wiki.openstreetmap.org/wiki/JOSM/Plugins/Mapillary
-plugin.main.version=8433
+plugin.main.version=10279
 plugin.requires=apache-commons;apache-http
 plugin.version=1.1.5
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 32329)
@@ -111,6 +111,6 @@
       MapView.addEditLayerChangeListener(this, false);
       MapView.addLayerChangeListener(this);
-      if (Main.map.mapView.getEditLayer() != null)
-        Main.map.mapView.getEditLayer().data.addDataSetListener(this);
+      if (Main.getLayerManager().getEditLayer() != null)
+        Main.getLayerManager().getEditLayer().data.addDataSetListener(this);
       if (MapillaryDownloader.getMode() == MapillaryDownloader.MODES.Automatic)
         MapillaryDownloader.automaticDownload();
@@ -223,6 +223,6 @@
     Main.map.mapView.removeMouseMotionListener(this.mode);
     MapView.removeEditLayerChangeListener(this);
-    if (Main.map.mapView.getEditLayer() != null)
-      Main.map.mapView.getEditLayer().data.removeDataSetListener(this);
+    if (Main.getLayerManager().getEditLayer() != null)
+      Main.getLayerManager().getEditLayer().data.removeDataSetListener(this);
     clearInstance();
     super.destroy();
@@ -286,5 +286,5 @@
   public synchronized void paint(final Graphics2D g, final MapView mv, final Bounds box) {
     g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-    if (Main.map.mapView.getActiveLayer() == this) {
+    if (Main.getLayerManager().getActiveLayer() == this) {
       // paint remainder
       g.setPaint(this.hatched);
@@ -323,5 +323,5 @@
       selectedImageKey = selectedImage.getSequence().getKey();
     }
-    g.setStroke(new BasicStroke(this == Main.map.mapView.getActiveLayer() ? 3 : 2));
+    g.setStroke(new BasicStroke(this == Main.getLayerManager().getActiveLayer() ? 3 : 2));
     for (MapillarySequence seq : getData().getSequences()) {
       if (selectedImageKey != null && selectedImageKey.equals(seq.getKey())) {
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 32329)
@@ -48,7 +48,7 @@
     }
     // Successive calls to this action toggle the active layer between the OSM data layer and the mapillary layer
-    Main.map.mapView.setActiveLayer(
-        Main.map.mapView.getActiveLayer() == MapillaryLayer.getInstance()
-          ? Main.map.mapView.getEditLayer()
+    Main.getLayerManager().setActiveLayer(
+        Main.getLayerManager().getActiveLayer() == MapillaryLayer.getInstance()
+          ? Main.getLayerManager().getEditLayer()
           : MapillaryLayer.getInstance()
     );
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/io/download/MapillaryDownloader.java	(revision 32329)
@@ -152,5 +152,5 @@
   public static void automaticDownload() {
     MapillaryLayer layer = MapillaryLayer.getInstance();
-    if (Main.map.mapView.getEditLayer() == null)
+    if (Main.getLayerManager().getEditLayer() == null)
       return;
     if (isAreaTooBig()) {
@@ -160,5 +160,5 @@
     if (getMode() != MODES.Automatic)
       throw new IllegalStateException("Must be in automatic mode.");
-    for (Bounds bounds : Main.map.mapView.getEditLayer().data
+    for (Bounds bounds : Main.getLayerManager().getEditLayer().data
         .getDataSourceBounds()) {
       if (!layer.getData().getBounds().contains(bounds)) {
@@ -177,5 +177,5 @@
   private static boolean isAreaTooBig() {
     double area = 0;
-    for (Bounds bounds : Main.map.mapView.getEditLayer().data.getDataSourceBounds()) {
+    for (Bounds bounds : Main.getLayerManager().getEditLayer().data.getDataSourceBounds()) {
       area += bounds.getArea();
     }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/JoinMode.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/JoinMode.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/JoinMode.java	(revision 32329)
@@ -71,5 +71,5 @@
   public void mouseMoved(MouseEvent e) {
     this.lastPos = e;
-    if (!(Main.map.mapView.getActiveLayer() instanceof MapillaryLayer))
+    if (!(Main.getLayerManager().getActiveLayer() instanceof MapillaryLayer))
       return;
     MapillaryAbstractImage closestTemp = getClosest(e.getPoint());
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/SelectMode.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/SelectMode.java	(revision 32328)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/SelectMode.java	(revision 32329)
@@ -52,10 +52,10 @@
       return;
     MapillaryAbstractImage closest = getClosest(e.getPoint());
-    if (!(Main.map.mapView.getActiveLayer() instanceof MapillaryLayer)
+    if (!(Main.getLayerManager().getActiveLayer() instanceof MapillaryLayer)
             && closest != null && Main.map.mapMode == Main.map.mapModeSelect) {
       this.lastClicked = this.closest;
       this.data.setSelectedImage(closest);
       return;
-    } else if (Main.map.mapView.getActiveLayer() != MapillaryLayer
+    } else if (Main.getLayerManager().getActiveLayer() != MapillaryLayer
             .getInstance())
       return;
@@ -98,5 +98,5 @@
   @Override
   public void mouseDragged(MouseEvent e) {
-    if (Main.map.mapView.getActiveLayer() != MapillaryLayer.getInstance()) {
+    if (Main.getLayerManager().getActiveLayer() != MapillaryLayer.getInstance()) {
       return;
     }
@@ -156,5 +156,5 @@
   @Override
   public void mouseMoved(MouseEvent e) {
-    if (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer
+    if (Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer
             && Main.map.mapMode != Main.map.mapModeSelect) {
       return;
@@ -167,5 +167,5 @@
 
     if (closestTemp != null
-            && Main.map.mapView.getActiveLayer() instanceof OsmDataLayer
+            && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer
             && !this.imageHighlighted) {
       Main.map.mapMode.putValue("active", Boolean.FALSE);
@@ -173,5 +173,5 @@
 
     } else if (closestTemp == null
-            && Main.map.mapView.getActiveLayer() instanceof OsmDataLayer
+            && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer
             && this.imageHighlighted && this.nothingHighlighted) {
       this.nothingHighlighted = false;
@@ -179,8 +179,8 @@
 
     } else if (this.imageHighlighted && !this.nothingHighlighted
-            && Main.map.mapView.getEditLayer().data != null
-            && Main.map.mapView.getActiveLayer() instanceof OsmDataLayer) {
-
-      for (OsmPrimitive primivitive : Main.map.mapView.getEditLayer().data
+            && Main.getLayerManager().getEditLayer().data != null
+            && Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer) {
+
+      for (OsmPrimitive primivitive : Main.getLayerManager().getEditLayer().data
               .allPrimitives()) {
         primivitive.setHighlighted(false);
Index: /applications/editors/josm/plugins/photoadjust/build.xml
===================================================================
--- /applications/editors/josm/plugins/photoadjust/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/photoadjust/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9416"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java
===================================================================
--- /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 32328)
+++ /applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java	(revision 32329)
@@ -133,5 +133,5 @@
         // GeoImageLayer.  GeoImageLayer's are handled by the plug-in
         // directly.
-        if (! (Main.map.mapView.getActiveLayer() instanceof GeoImageLayer)) {
+        if (! (Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) {
             activateMode();
         }
@@ -208,5 +208,5 @@
     private boolean hasLayersToAdjust() {
         if (Main.map == null || Main.map.mapView == null) return false;
-        return ! Main.map.mapView.getLayersOfType(GeoImageLayer.class).isEmpty();
+        return ! Main.getLayerManager().getLayersOfType(GeoImageLayer.class).isEmpty();
     }
 
@@ -217,5 +217,5 @@
      */
     private List<GeoImageLayer> getVisibleGeoImageLayers() {
-        List<GeoImageLayer> all = new ArrayList<>(Main.map.mapView.getLayersOfType(GeoImageLayer.class));
+        List<GeoImageLayer> all = new ArrayList<>(Main.getLayerManager().getLayersOfType(GeoImageLayer.class));
         Iterator<GeoImageLayer> it = all.iterator();
         while (it.hasNext()) {
Index: /applications/editors/josm/plugins/piclayer/build.xml
===================================================================
--- /applications/editors/josm/plugins/piclayer/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/piclayer/build.xml	(revision 32329)
@@ -3,5 +3,5 @@
     <property name="commit.message" value="[josm/PicLayer] - #12045 add ability to localize dialog titles"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7817"/>
+    <property name="plugin.main.version" value="10279"/>
 	
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 32329)
@@ -158,6 +158,5 @@
                 new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null);
         }
-        // Why should I do all these checks now?
-        boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0;
+        boolean enable = !Main.getLayerManager().getLayers().isEmpty();
         newLayerFromFileAction.setEnabled(enable);
         newLayerFromClipboardAction.setEnabled(enable);
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java	(revision 32329)
@@ -57,6 +57,6 @@
     public void mousePressed(MouseEvent e) {
         // Start action
-        if ( Main.map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {
-            currentLayer = (PicLayerAbstract)Main.map.mapView.getActiveLayer();
+        if ( Main.getLayerManager().getActiveLayer() instanceof PicLayerAbstract ) {
+            currentLayer = (PicLayerAbstract)Main.getLayerManager().getActiveLayer();
 
             if ( currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) {
@@ -99,5 +99,5 @@
 
     protected void updateDrawPoints(boolean value) {
-        Layer active = Main.map.mapView.getActiveLayer();
+        Layer active = Main.getLayerManager().getActiveLayer();
         if (active instanceof PicLayerAbstract) {
             ((PicLayerAbstract)active).setDrawPoints(value);
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 32329)
@@ -119,6 +119,6 @@
             // or at the bottom of the stack if there is no such layer yet
             // The next layers we load will be placed one after the other after this first layer
-            int newLayerPos = Main.map.mapView.getAllLayers().size();
-            for(Layer l : Main.map.mapView.getLayersOfType(PicLayerAbstract.class)) {
+            int newLayerPos = Main.getLayerManager().getLayers().size();
+            for(Layer l : Main.getLayerManager().getLayersOfType(PicLayerAbstract.class)) {
                 int pos = Main.map.mapView.getLayerPos(l);
                 if (pos < newLayerPos) newLayerPos = pos;
Index: /applications/editors/josm/plugins/rasterfilters/.project
===================================================================
--- /applications/editors/josm/plugins/rasterfilters/.project	(revision 32328)
+++ /applications/editors/josm/plugins/rasterfilters/.project	(revision 32329)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>rasterfilters</name>
+	<name>JOSM-rasterfilters</name>
 	<comment>JavaCC Nature</comment>
 	<projects>
Index: /applications/editors/josm/plugins/rasterfilters/build.xml
===================================================================
--- /applications/editors/josm/plugins/rasterfilters/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/rasterfilters/build.xml	(revision 32329)
@@ -10,5 +10,5 @@
 	
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="8625" />
+	<property name="plugin.main.version" value="10279" />
 	<property name="plugin.version" value="1.0.1"/>
 
Index: /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java
===================================================================
--- /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java	(revision 32329)
@@ -119,5 +119,5 @@
 		}
 
-		if (Main.map.mapView.getAllLayersAsList().size() == 0) {
+		if (Main.getLayerManager().getLayers().isEmpty()) {
 
 			Container container = filterButton.getParent();
Index: /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/actions/ShowLayerFiltersDialog.java
===================================================================
--- /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/actions/ShowLayerFiltersDialog.java	(revision 32328)
+++ /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/actions/ShowLayerFiltersDialog.java	(revision 32329)
@@ -51,5 +51,5 @@
 	public void actionPerformed(ActionEvent e) {
 
-		Layer layer = Main.map.mapView.getActiveLayer();
+		Layer layer = Main.getLayerManager().getActiveLayer();
 
 		if (layer instanceof ImageryLayer) {
Index: /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/model/FiltersManager.java
===================================================================
--- /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/model/FiltersManager.java	(revision 32328)
+++ /applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/model/FiltersManager.java	(revision 32329)
@@ -131,5 +131,5 @@
 
 		filter.changeFilterState(filterState.encodeJson());
-		Main.map.mapView.getActiveLayer().setFilterStateChanged();
+		Main.getLayerManager().getActiveLayer().setFilterStateChanged();
 
 		fp.createBottomPanel(this);
@@ -155,6 +155,6 @@
 			filtersMap.get(filterId).changeFilterState(filterState.encodeJson());
 
-		if (Main.map.mapView.getActiveLayer() != null) {
-			Main.map.mapView.getActiveLayer().setFilterStateChanged();
+		if (Main.getLayerManager().getActiveLayer() != null) {
+			Main.getLayerManager().getActiveLayer().setFilterStateChanged();
 		}
 
@@ -239,5 +239,5 @@
 		}
 
-		Main.map.mapView.getActiveLayer().setFilterStateChanged();
+		Main.getLayerManager().getActiveLayer().setFilterStateChanged();
 
 	}
@@ -255,5 +255,5 @@
 			disabledFilters.add(filtersMap.get(filterId));
 
-			Main.map.mapView.getActiveLayer().setFilterStateChanged();
+			Main.getLayerManager().getActiveLayer().setFilterStateChanged();
 
 		} else {
@@ -262,5 +262,5 @@
 			disabledFilters.remove(filtersMap.get(filterId));
 
-			Main.map.mapView.getActiveLayer().setFilterStateChanged();
+			Main.getLayerManager().getActiveLayer().setFilterStateChanged();
 
 		}
Index: /applications/editors/josm/plugins/routes/build.xml
===================================================================
--- /applications/editors/josm/plugins/routes/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/routes/build.xml	(revision 32329)
@@ -2,5 +2,5 @@
 <project name="routes" default="dist" basedir=".">
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
-    <property name="plugin.main.version" value="8811"/>
+    <property name="plugin.main.version" value="10279"/>
     <property name="josm" location="../../core/dist/josm-custom.jar"/>
     <property name="plugin.dist.dir" value="../../dist"/>
Index: /applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
===================================================================
--- /applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java	(revision 32328)
+++ /applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java	(revision 32329)
@@ -79,5 +79,5 @@
     private void checkLayers() {
         if (Main.map != null && Main.map.mapView != null) {
-            for (Layer layer:Main.map.mapView.getAllLayers()) {
+            for (Layer layer:Main.getLayerManager().getLayers()) {
                 if (layer instanceof OsmDataLayer) {
                     if (!isShown) {
Index: /applications/editors/josm/plugins/routing/build.xml
===================================================================
--- /applications/editors/josm/plugins/routing/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/routing/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="added one-way support in roundabouts"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!--
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 32329)
@@ -350,5 +350,5 @@
         Graph<Node,OsmEdge> g;
         double totalWeight = 0;
-        RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+        RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
         RoutingModel routingModel = layer.getRoutingModel();
 
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java	(revision 32329)
@@ -83,6 +83,6 @@
             // Search for nearest highway node
             Node node = null;
-            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+            if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                 node = layer.getNearestHighwayNode(e.getPoint());
                 if(node == null) {
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 32329)
@@ -96,7 +96,7 @@
         // If left button is pressed
         if (e.getButton() == MouseEvent.BUTTON1) {
-            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+            if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
                 requestFocusInMapView();
-                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                 RoutingModel routingModel = layer.getRoutingModel();
                 // Search for the nearest node in the list
@@ -129,6 +129,6 @@
 
     private void searchAndReplaceNode(Point point) {
-        if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-            RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+        if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+            RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
             RoutingModel routingModel = layer.getRoutingModel();
             RoutingDialog routingDialog = RoutingPlugin.getInstance().getRoutingDialog();
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java	(revision 32329)
@@ -84,6 +84,6 @@
         // If left button is clicked
         if (e.getButton() == MouseEvent.BUTTON1) {
-            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+            if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                 RoutingModel routingModel = layer.getRoutingModel();
                 // Search for the nearest node in the list
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java	(revision 32329)
@@ -131,6 +131,6 @@
     public void refresh() {
         clearNodes();
-        if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-            RoutingLayer routingLayer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+        if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+            RoutingLayer routingLayer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
             RoutingModel routingModel = routingLayer.getRoutingModel();
             for (Node n : routingModel.getSelectedNodes()) {
Index: /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java
===================================================================
--- /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java	(revision 32328)
+++ /applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java	(revision 32329)
@@ -93,6 +93,6 @@
         rshorter.addItemListener(new ItemListener() {
             public void itemStateChanged(ItemEvent e) {
-                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                     RoutingModel routingModel = layer.getRoutingModel();
                     if (e.getStateChange()==ItemEvent.SELECTED) {
@@ -122,6 +122,6 @@
         cbmi.addItemListener(new ItemListener() {
             public void itemStateChanged(ItemEvent e) {
-                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                     RoutingModel routingModel = layer.getRoutingModel();
                     if (e.getStateChange()==ItemEvent.SELECTED)
@@ -142,6 +142,6 @@
         reverseMI.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
-                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                     RoutingModel routingModel = layer.getRoutingModel();
                     routingModel.reverseNodes();
@@ -155,6 +155,6 @@
         clearMI.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
-                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                     RoutingModel routingModel = layer.getRoutingModel();
                     // Reset routing nodes and paths
@@ -171,6 +171,6 @@
             public void actionPerformed(ActionEvent e) {
 
-                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                if (Main.getLayerManager().getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.getLayerManager().getActiveLayer();
                     RoutingModel routingModel = layer.getRoutingModel();
                     routingModel.routingGraph.resetGraph();
Index: /applications/editors/josm/plugins/sds/build.xml
===================================================================
--- /applications/editors/josm/plugins/sds/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/sds/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value=""/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="8415"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!--
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java	(revision 32328)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java	(revision 32329)
@@ -55,5 +55,5 @@
 
     void setEnabledState() {
-        boolean en = (Main.map != null) && (Main.map.mapView != null) && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer);
+        boolean en = Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer;
         loadItem.setEnabled(en);
         saveItem.setEnabled(en);
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java	(revision 32329)
@@ -37,6 +37,6 @@
     public boolean doSave() {
         Layer layer = null;
-        if (Main.isDisplayingMapView() && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer))
-            layer = Main.map.mapView.getActiveLayer();
+        if (Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)
+            layer = Main.getLayerManager().getActiveLayer();
 
         if (layer == null)
Index: /applications/editors/josm/plugins/surveyor/build.xml
===================================================================
--- /applications/editors/josm/plugins/surveyor/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/surveyor/build.xml	(revision 32329)
@@ -7,5 +7,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="8863"/>
+    <property name="plugin.main.version" value="10279"/>
     <property name="livegpsplugin.jar" value="${plugin.dist.dir}/livegps.jar"/>
 
Index: /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java
===================================================================
--- /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 32328)
+++ /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 32329)
@@ -125,5 +125,5 @@
     public GpxLayer getGpxLayer() {
         if(liveGpsLayer == null) {
-            Collection<Layer> layers = Main.map.mapView.getAllLayers();
+            Collection<Layer> layers = Main.getLayerManager().getLayers();
             for (Layer layer : layers) {
                 if(layer instanceof LiveGpsLayer) {
Index: /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java
===================================================================
--- /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java	(revision 32328)
+++ /applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java	(revision 32329)
@@ -24,5 +24,5 @@
         Layer result = null;
         if(Main.map != null && Main.map.mapView != null) {
-            for(Layer layer : Main.map.mapView.getAllLayers()) {
+            for(Layer layer : Main.getLayerManager().getLayers()) {
                 if(layerName.equals(layer.getName()) && layerType.isAssignableFrom(layer.getClass())) {
                     result = layer;
Index: /applications/editors/josm/plugins/turnrestrictions/build.xml
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/turnrestrictions/build.xml	(revision 32329)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="8863"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 32328)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 32329)
@@ -819,5 +819,5 @@
         public void actionPerformed(ActionEvent e) {
             if (Main.main.getActiveLayer() != getLayer()){
-                Main.map.mapView.setActiveLayer(getLayer());
+                Main.getLayerManager().setActiveLayer(getLayer());
             }
             Relation tr = getTurnRestriction();
Index: /applications/editors/josm/plugins/videomapping/.classpath
===================================================================
--- /applications/editors/josm/plugins/videomapping/.classpath	(revision 32328)
+++ /applications/editors/josm/plugins/videomapping/.classpath	(revision 32329)
@@ -2,5 +2,4 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="test"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
Index: /applications/editors/josm/plugins/waypoint_search/build.xml
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 32328)
+++ /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 32329)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="bugfix of search when layer is added"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <property name="plugin.author" value="Åsmund Realfsen - realfsen at gmx.net"/>
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 32328)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 32329)
@@ -18,5 +18,5 @@
         if (gpxLayersExist()) {
             //Loop over marker (waypoint) layers.. it could be more than one
-            for (Iterator<MarkerLayer> it = Main.map.mapView.getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
+            for (Iterator<MarkerLayer> it = Main.getLayerManager().getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
                 //loop over each marker (waypoint)
                 for (Iterator<Marker> markerIterator = it.next().data.iterator(); markerIterator.hasNext();) {
@@ -32,5 +32,5 @@
     
     static boolean gpxLayersExist() {
-        return Main.map != null && Main.map.mapView.hasLayers() && !Main.map.mapView.getLayersOfType(MarkerLayer.class).isEmpty();
+        return !Main.getLayerManager().getLayersOfType(MarkerLayer.class).isEmpty();
     }
 }
