X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b2b6892a4553eeaa8d601737dee440eba0c6d6a6..e7c2d2a211e0f5604acc53f4a941067d94d675a9:/app/views/site/index.rhtml diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index fb5327b81..e83261a2b 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -7,45 +7,69 @@
- +<% lon = params['lon'] || '-0.1' %> +<% lat = params['lat'] || '51.5' %> +<% zoom = params['zoom'] || '5' %> + + - 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://<%= SERVER_URL %>/javascript/img/404.png"; + } + map = new OpenLayers.Map( "map", + {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxZoomLevel:18, maxResolution:156543, units:'meters', projection: "EPSG:41001"} ); + layer = new OpenLayers.Layer.LikeGoogle( "Mapnik", "http://tile.openstreetmap.org/", {type:'png'} ); + map.addLayer(layer); + layer = new OpenLayers.Layer.LikeGoogle( "Osmarender", "http://dev.openstreetmap.org/~ojw/Tiles/tile.php/", {type:'png'} ); + map.addLayer(layer); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); - -<% unless @user %> -