X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c25a20ff133d0ff9c865ac2cbc0076544cb4f16b..db66d47e42bc267670ef00b3b2611b4b53cb40e9:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 9f9be0987..291fd18fa 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 });