]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Reverse order of marker and vector layers to stop the vector layer
[rails.git] / public / javascripts / map.js
index 3cfa2f9a1dace745cc8ecf22faa55b40d26f082b..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;
 }
 
@@ -123,7 +123,7 @@ function addBoxToMap(boxbounds) {
    var box = new OpenLayers.Feature.Vector(geometry, {}, {
       strokeWidth: 2,
       strokeColor: '#ee9900',
-      fillOpacity: 0,
+      fillOpacity: 0
    });
    
    vectors.addFeatures(box);