X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/436012c6975cf2eef7d9908ad48d70dad833afd0..88105d9c643519e02082ba9cc5044bb0dfdcb7b9:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 7591d7d16..2bdba6229 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -7,9 +7,11 @@ OpenLayers._getScriptLocation = function () { return "/openlayers/"; } -function createMap(divName) { +function createMap(divName, options) { + options = options || {}; + map = new OpenLayers.Map(divName, { - controls: [ + controls: options.controls || [ new OpenLayers.Control.ArgParser(), new OpenLayers.Control.Attribution(), new OpenLayers.Control.LayerSwitcher(), @@ -18,7 +20,7 @@ function createMap(divName) { new OpenLayers.Control.ScaleLine() ], units: "m", - maxResolution: 156543, + maxResolution: 156543.0339, numZoomLevels: 20 });