Reverse order of marker and vector layers to stop the vector layer

grabbing all the mouse clicks. Closes #1718.
This commit is contained in:
Tom Hughes 2009-04-19 11:12:28 +00:00
parent e9c2c64884
commit 8f8de8deaa

View file

@ -74,6 +74,17 @@ function createMap(divName, options) {
map.addLayer(maplint);
var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
vectors = new OpenLayers.Layer.Vector("Vectors", {
displayInLayerSwitcher: false,
numZoomLevels: numZoomLevels,
maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
maxResolution: 156543,
units: "m",
projection: "EPSG:900913"
});
map.addLayer(vectors);
markers = new OpenLayers.Layer.Markers("Markers", {
displayInLayerSwitcher: false,
numZoomLevels: numZoomLevels,
@ -84,17 +95,6 @@ function createMap(divName, options) {
});
map.addLayer(markers);
vectors = new OpenLayers.Layer.Vector("Vectors", {
displayInLayerSwitcher: false,
numZoomLevels: numZoomLevels,
maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
maxResolution: 156543,
units: "m",
projection: "EPSG:900913"
});
map.addLayer(vectors);
return map;
}