openlayers madness
[rails.git] / app / views / site / index.rhtml
1 <div id="geocoder">
2   <form action="/search.html">
3     <input type="text" name="query" value="" size="60">
4     <input type="submit" value="Search">
5   </form>
6 </div>
7
8 <div id="map" style="WIDTH: 700px; HEIGHT: 500px;"></div>
9
10 <script src="lib/OpenLayers.js"></script>
11 <script type="text/javascript">
12   <!--
13   function init(){
14     var map = new OpenLayers.Map('map');
15
16     var osm_wms = new OpenLayers.Layer.WMS( "OpenStreetMap Streets",
17         "http://tile.openstreetmap.org/cgi-bin/mapserv?map=/usr/lib/cgi-bin/steve/osm.map",
18         {layers: "default_segment,segments,class_segment",
19 transparent: "true", format: "image/png" });
20
21     // FIXME this should be landsat.openstreetmap.org
22
23     var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
24         "http://wms.jpl.nasa.gov/wms.cgi",
25         {layers: "modis,global_mosaic"});
26
27
28     map.addLayers([jpl_wms, osm_wms]);
29     map.zoomToFullExtent();
30   }
31
32 init();
33 // -->
34 </script>
35
36
37 <!--
38 <div id="drag" style="WIDTH: 700px; HEIGHT: 500px;">
39   <div id='controls'>
40     <a id="zoomout" class="mapcontrol"><img src="/images/map_zoomout.png" alt="zoom out"></a>
41     <a id="zoomin" class="mapcontrol"> <img src="/images/map_zoomin.png" alt="zoom in">  </a>
42   </div>
43 </div>
44
45 <div id="debuginfo"></div>
46 -->
47 <% unless @user %>
48 <div id="gads">
49   <script type="text/javascript"><!--
50     google_ad_client = "pub-7727744269903103";
51     google_ad_width = 728;
52     google_ad_height = 90;
53     google_ad_format = "728x90_as";
54     google_ad_type = "text";
55     google_ad_channel ="";
56     google_color_border = "CCCCCC";
57     google_color_bg = "FFFFFF";
58     google_color_link = "000000";
59     google_color_url = "000080";
60     google_color_text = "000000";
61     //--></script><script type="text/javascript"
62     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
63     </script>We're trialing adverts to support the project. Login and they go away.
64   </div>
65   <% end %>
66
67   <!--
68   <script type="text/javascript">
69     lat = 0;
70     lon = 0;
71     zoom = 0;
72
73     init();
74   </script>
75
76   -->