From 8f8de8deaa2d8610119d7f8c8d2fee4a80cd9976 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 19 Apr 2009 11:12:28 +0000 Subject: [PATCH 1/1] Reverse order of marker and vector layers to stop the vector layer grabbing all the mouse clicks. Closes #1718. --- public/javascripts/map.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 92967adcd..746dd5baf 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -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; } -- 2.43.2