2 <form action="/search.html">
3 <input type="text" name="query" value="" size="60">
4 <input type="submit" value="Search">
8 <div id="map" style="WIDTH: 700px; HEIGHT: 500px;"></div>
10 <% lon = params['lon'] || '-0.1' %>
11 <% lat = params['lat'] || '51.5' %>
12 <% zoom = params['zoom'] || '11' %>
14 <script type="text/javascript">
17 var zoom = <%= zoom %>;
18 var PI = 3.14159265358979323846;
20 <% if params['scale'] and params['scale'].length > 0 then %>
21 zoom = Math.log(360.0/(( <% print params['scale'].to_f() %> ) * 512.0)) / Math.log(2.0);
24 lon = lon * 20037508.34 / 180;
25 lat = Math.log(Math.tan( (90 + lat) * PI / 360)) / (PI / 180);
26 lat = lat * 20037508.34 / 180;
29 <script type="text/javascript" src="/javascripts/OpenLayers.js"></script>
31 <script type="text/javascript">
38 OpenLayers.Util.onImageLoadError = function() {
39 this.src = "http://www.openstreetmap.org/javascript/img/404.png";
41 map = new OpenLayers.Map( "map",
42 {maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34), maxResolution:156543, units:'meters', projection: "EPSG:41001"} );
43 layer = new OpenLayers.Layer.LikeGoogle( "Mapnik", "http://artem.dev.openstreetmap.org/osm_tiles/", {type:'png'} );
45 layer = new OpenLayers.Layer.LikeGoogle( "Osmarender", "http://osmathome.bandnet.org/Tiles/", {type:'png'} );
47 layer = new OpenLayers.Layer.WMS( "Mapnik WMS-C", "http://labs.metacarta.com/wms-c/Basic.py?", {layers:'osm-merc'});
50 map.addControl(new OpenLayers.Control.LayerSwitcher());
51 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
53 map.events.register("moveend", map, function() {
54 var lonlat = map.getCenter();
56 var lon_deg = (lonlat.lon / 20037508.34) * 180;
57 var lat_deg = (lonlat.lat / 20037508.34) * 180;
58 var PI = 3.14159265358979323846;
59 lat_deg = 180/PI * (2 * Math.atan(Math.exp(lat_deg * PI / 180)) - PI / 2);
60 var zoom = map.getZoom() + 3;
61 updatelinks(lon_deg,lat_deg,zoom);
74 <script type="text/javascript"><!--
75 google_ad_client = "pub-7727744269903103";
76 google_ad_width = 728;
77 google_ad_height = 90;
78 google_ad_format = "728x90_as";
79 google_ad_type = "text";
80 google_ad_channel ="";
81 google_color_border = "CCCCCC";
82 google_color_bg = "FFFFFF";
83 google_color_link = "000000";
84 google_color_url = "000080";
85 google_color_text = "000000";
86 //--></script><script type="text/javascript"
87 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
88 </script>We're trialing adverts to support the project. Login and they go away.
93 <script type="text/javascript">