]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Merge 7744:7922 from trunk.
[rails.git] / public / javascripts / map.js
index 7591d7d162b4e2b73c40449efab37256d77bee3b..2bdba6229b589b8d52ae3a96fd8e21e5d8b361d9 100644 (file)
@@ -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
    });