]> git.openstreetmap.org Git - rails.git/commitdiff
Merged 7296:7388 from rails_port trunk.
authorTom Hughes <tom@compton.nu>
Wed, 16 Apr 2008 23:52:32 +0000 (23:52 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 16 Apr 2008 23:52:32 +0000 (23:52 +0000)
1  2 
public/javascripts/map.js

index 9858d4576c0ae27c4a5eb0e94c4ff1cee7535b19,d8765fe1a93fcb6507427427468c429c116b133a..51cd9f6a5abfbc62abcf4c382825e59dad1e4e9b
@@@ -5,29 -6,36 +6,37 @@@ var popup
  OpenLayers._getScriptLocation = function () {
     return "/openlayers/";
  }
-    
  function createMap(divName) {
     map = new OpenLayers.Map(divName, {
-       maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
-       maxResolution: 156543,
-       units: "m",
-       projection: "EPSG:900913",
        controls: [
-          new OpenLayers.Control.ArgParser(), 
+          new OpenLayers.Control.ArgParser(),
           new OpenLayers.Control.Attribution(),
           new OpenLayers.Control.LayerSwitcher(),
-          new OpenLayers.Control.Navigation(), 
-          new OpenLayers.Control.PanZoomBar()
-       ]
+          new OpenLayers.Control.Navigation(),
+          new OpenLayers.Control.PanZoomBar(),
+          new OpenLayers.Control.ScaleLine()
+       ],
++      maxResolution: 156543,
+       units: "m"
     });
  
-    var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", { displayOutsideMaxExtent: true });
+    var mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik", {
+       displayOutsideMaxExtent: true,
+       wrapDateLine: true
+    });
     map.addLayer(mapnik);
  
-    var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", { displayOutsideMaxExtent: true });
+    var osmarender = new OpenLayers.Layer.OSM.Osmarender("Osmarender", {
+       displayOutsideMaxExtent: true,
+       wrapDateLine: true
+    });
     map.addLayer(osmarender);
  
-    var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", { displayOutsideMaxExtent: true });
+    var maplint = new OpenLayers.Layer.OSM.Maplint("Maplint", {
+       displayOutsideMaxExtent: true,
+       wrapDateLine: true
+    });
     map.addLayer(maplint);
  
     var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);