]> git.openstreetmap.org Git - rails.git/commitdiff
Fix offset when laying in vectors on top of the OSM tiles.
authorChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 20 Apr 2008 13:16:29 +0000 (13:16 +0000)
committerChristopher Schmidt <crschmidt@crschmidt.net>
Sun, 20 Apr 2008 13:16:29 +0000 (13:16 +0000)
public/javascripts/map.js
public/openlayers/OpenStreetMap.js

index 0dadbb9d355b1e11fc3f561abe7bbf42104cb100..bc2e9086326dbbbe1b24b6bdbc9da474c1ef9b7b 100644 (file)
@@ -19,7 +19,7 @@ function createMap(divName, options) {
          new OpenLayers.Control.ScaleLine()
       ],
       units: "m",
-      maxResolution: 156543,
+      maxResolution: 156543.0339,
       numZoomLevels: 20
    });
 
index c2acf2e0c8ef7035fe6d25cc20ca9265e6e28fc3..d6bc397d132ae517433ae494ad5956a0cc18cef1 100644 (file)
@@ -48,8 +48,8 @@ OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.TMS, {
     initialize: function(name, url, options) {
         options = OpenLayers.Util.extend({
             attribution: "Data by <a href='http://openstreetmap.org/'>OpenStreetMap</a>",
-            maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
-            maxResolution: 156543,
+            maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
+            maxResolution: 156543.0339,
             units: "m",
             projection: "EPSG:900913",
             transitionEffect: "resize"