X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/b2b6892a4553eeaa8d601737dee440eba0c6d6a6..fb1467a94487cfdfcb19e4f88e05be7aa88096f0:/app/views/site/index.rhtml?ds=sidebyside diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index fb5327b81..d6b18346a 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -7,45 +7,65 @@
- +<% lon = params['lon'] || '-0.1' %> +<% lat = params['lat'] || '51.5' %> +<% zoom = params['zoom'] || '11' %> + + - // FIXME this should be landsat.openstreetmap.org + + map.events.register("moveend", map, function() { + var lonlat = map.getCenter(); + + var lon_deg = (lonlat.lon / 20037508.34) * 180; + var lat_deg = (lonlat.lat / 20037508.34) * 180; + var PI = 3.14159265358979323846; + lat_deg = 180/PI * (2 * Math.atan(Math.exp(lat_deg * PI / 180)) - PI / 2); + var zoom = map.getZoom() + 3; + updatelinks(lon_deg,lat_deg,zoom); + }); + } - + + + -
---> -<% unless @user %> -
+ <% unless @user %> +
+ - --> + -->