X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b2b6892a4553eeaa8d601737dee440eba0c6d6a6..e5f292cf21a5fa72733080a294484e0e4208e0e7:/app/views/site/index.rhtml?ds=sidebyside diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index fb5327b81..a7dbd15e3 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -7,45 +7,70 @@
- +<% lon = params['lon'] || '-0.1' %> +<% lat = params['lat'] || '51.5' %> +<% zoom = params['zoom'] || '11' %> + + - var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", - "http://wms.jpl.nasa.gov/wms.cgi", - {layers: "modis,global_mosaic"}); + + OpenLayers.Util.onImageLoadError = function() { + this.src = "http://www.openstreetmap.org/javascript/img/404.png"; + } + map = new OpenLayers.Map( "map", + {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution:156543, units:'meters', projection: "EPSG:41001"} ); + layer = new OpenLayers.Layer.LikeGoogle( "Mapnik", "http://artem.dev.openstreetmap.org/osm_tiles/", {type:'png'} ); + map.addLayer(layer); + layer = new OpenLayers.Layer.LikeGoogle( "Osmarender", "http://osmathome.bandnet.org/Tiles/", {type:'png'} ); + map.addLayer(layer); + layer = new OpenLayers.Layer.WMS( "Mapnik WMS-C", "http://labs.metacarta.com/wms-c/Basic.py?", {layers:'osm-merc'}); + map.addLayer(layer); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); - + + + -
---> -<% unless @user %> -
+ <% unless @user %> +
+ - --> + -->