]> git.openstreetmap.org Git - rails.git/blobdiff - public/javascripts/map.js
Merge potlatch_010 branch to head.
[rails.git] / public / javascripts / map.js
index 9f9be0987d4fa3d0071f0d5f8c55a465db16b452..291fd18fa29ff645520a1038b0dfa92e338d9bc6 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
    });