]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
openlayers madness
[rails.git] / app / views / site / index.rhtml
index 25cebdc23397b8bb6e9bfabb81d94a703d55853c..fb5327b8146febd735ae632916a779935355ba74 100644 (file)
@@ -5,6 +5,36 @@
   </form>
 </div>
 
+<div id="map" style="WIDTH: 700px; HEIGHT: 500px;"></div>
+
+<script src="lib/OpenLayers.js"></script>
+<script type="text/javascript">
+  <!--
+  function init(){
+    var map = new OpenLayers.Map('map');
+
+    var osm_wms = new OpenLayers.Layer.WMS( "OpenStreetMap Streets",
+        "http://tile.openstreetmap.org/cgi-bin/mapserv?map=/usr/lib/cgi-bin/steve/osm.map",
+        {layers: "default_segment,segments,class_segment",
+transparent: "true", format: "image/png" });
+
+    // FIXME this should be landsat.openstreetmap.org
+
+    var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
+        "http://wms.jpl.nasa.gov/wms.cgi",
+        {layers: "modis,global_mosaic"});
+
+
+    map.addLayers([jpl_wms, osm_wms]);
+    map.zoomToFullExtent();
+  }
+
+init();
+// -->
+</script>
+
+
+<!--
 <div id="drag" style="WIDTH: 700px; HEIGHT: 500px;">
   <div id='controls'>
     <a id="zoomout" class="mapcontrol"><img src="/images/map_zoomout.png" alt="zoom out"></a>
@@ -13,7 +43,7 @@
 </div>
 
 <div id="debuginfo"></div>
-
+-->
 <% unless @user %>
 <div id="gads">
   <script type="text/javascript"><!--
     google_color_text = "000000";
     //--></script><script type="text/javascript"
     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-  </script>We're trialing adverts to support the project. Login and they go away.
-</div>
-<% end %>
+    </script>We're trialing adverts to support the project. Login and they go away.
+  </div>
+  <% end %>
 
+  <!--
+  <script type="text/javascript">
+    lat = 0;
+    lon = 0;
+    zoom = 0;
 
-<script type="text/javascript">
-  lat = 0;
-  lon = 0;
-  zoom = 0;
+    init();
+  </script>
 
-  init();
-</script>
+  -->