Set extent information for the marker layer.
This commit is contained in:
parent
0c549650eb
commit
1e9483fe72
1 changed files with 7 additions and 1 deletions
|
@ -16,7 +16,13 @@ function createMap(divName) {
|
|||
map.addLayer(osmarender);
|
||||
|
||||
var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
|
||||
markers = new OpenLayers.Layer.Markers("Markers", { visibility: false, numZoomLevels: numZoomLevels });
|
||||
markers = new OpenLayers.Layer.Markers("Markers", {
|
||||
visibility: false, numZoomLevels: numZoomLevels,
|
||||
maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
|
||||
maxResolution: 156543,
|
||||
units: "m",
|
||||
projection: "EPSG:41001"
|
||||
});
|
||||
map.addLayer(markers);
|
||||
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue