X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/935656bfbe615c92d2931215e3e4944d0d2f2738..4d8ea0eed0d47b3547f222fbc47524328bbd23a7:/public/javascripts/map.js diff --git a/public/javascripts/map.js b/public/javascripts/map.js index db5b85616..9b144c560 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 });