]> git.openstreetmap.org Git - rails.git/commitdiff
Reverse order of marker and vector layers to stop the vector layer
authorTom Hughes <tom@compton.nu>
Sun, 19 Apr 2009 11:12:28 +0000 (11:12 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Apr 2009 11:12:28 +0000 (11:12 +0000)
grabbing all the mouse clicks. Closes #1718.

public/javascripts/map.js

index 92967adcd9c01fb02143b8b0ac3458548b260c94..746dd5bafc51987092dabd005f01184417cb8f8b 100644 (file)
@@ -74,7 +74,8 @@ function createMap(divName, options) {
    map.addLayer(maplint);
 
    var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
-   markers = new OpenLayers.Layer.Markers("Markers", {
+
+   vectors = new OpenLayers.Layer.Vector("Vectors", {
       displayInLayerSwitcher: false,
       numZoomLevels: numZoomLevels,
       maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
@@ -82,9 +83,9 @@ function createMap(divName, options) {
       units: "m",
       projection: "EPSG:900913"
    });
-   map.addLayer(markers);
-   
-   vectors = new OpenLayers.Layer.Vector("Vectors", {
+   map.addLayer(vectors);
+
+   markers = new OpenLayers.Layer.Markers("Markers", {
       displayInLayerSwitcher: false,
       numZoomLevels: numZoomLevels,
       maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
@@ -92,9 +93,8 @@ function createMap(divName, options) {
       units: "m",
       projection: "EPSG:900913"
    });
-   map.addLayer(vectors);
+   map.addLayer(markers);
    
-
    return map;
 }