[OpenLayers-Commits] r4244 - in sandbox/tschaub: . wfsv/examples

commits at openlayers.org commits at openlayers.org
Wed Sep 12 12:49:37 EDT 2007


Author: tschaub
Date: 2007-09-12 12:49:36 -0400 (Wed, 12 Sep 2007)
New Revision: 4244

Removed:
   sandbox/tschaub/google/
Modified:
   sandbox/tschaub/wfsv/examples/wfs-v.html
Log:
goodbye fair google sandbox

Modified: sandbox/tschaub/wfsv/examples/wfs-v.html
===================================================================
--- sandbox/tschaub/wfsv/examples/wfs-v.html	2007-09-12 15:05:18 UTC (rev 4243)
+++ sandbox/tschaub/wfsv/examples/wfs-v.html	2007-09-12 16:49:36 UTC (rev 4244)
@@ -54,13 +54,20 @@
             padding: 0.75em 0 0.75em 0;
         }
     </style>
+    <!-- dev.openlayers.org key
+    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAeDjUod8ItM9dBg5_lz0esxTk5UTxNMOJaMwpeYJby65YwI0-cxSmHf2_ZfIP7bDb_moMph5qZy25YA" type="text/javascript"></script>
+    -->
+    <!-- Localhost key -->
+    <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>
     <script src="../lib/Firebug/firebug.js"></script>
     <script src="../lib/OpenLayers.js"></script>
     <script type="text/javascript">
-        <!--
         
-        //OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
-        OpenLayers.ProxyHost = "proxy.cgi?url=";
+        if(window.location.host == "localhost") {
+            OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
+        } else {
+            OpenLayers.ProxyHost = "proxy.cgi?url=";
+        }
         
         var wfsUrl = "http://geo.openplans.org/geoserver/wfsv",
             wmsUrl = "http://geo.openplans.org/geoserver/wms",
@@ -69,17 +76,26 @@
 
         function init(){
             var options = {
-                theme: null,
-                projection: 'EPSG:26713',
-                units: 'm',
-                maxExtent: new OpenLayers.Bounds(588743, 4911067,
-                                                 609489, 4929927),
-                maxResolution: "auto",
-                controls: [new OpenLayers.Control.PanZoom()]
+                controls: [new OpenLayers.Control.PanZoom()],
+                projection: "EPSG:900913",
+                units: "m",
+                maxResolution: 156543.0339,
+                maxExtent: new OpenLayers.Bounds(-11570655, 5518524,
+                                                 -11528614, 5549099)
             };
             map = new OpenLayers.Map('map', options);
+            // create Google Mercator layers
+            gmap = new OpenLayers.Layer.GoogleMercator("Streets");
+            gsat = new OpenLayers.Layer.GoogleMercator("Imagery",
+                                                       {type: G_SATELLITE_MAP});
+            ghyb = new OpenLayers.Layer.GoogleMercator("Streets & Imagery",
+                                                       {type: G_HYBRID_MAP});
+
             wms.restricted = new OpenLayers.Layer.WMS("Restricted Areas", wmsUrl,
-                                                  {layers: "topp:restricted"});
+                                                  {layers: "topp:restricted",
+                                                  format: "image/png",
+                                                  transparent: "true"},
+                                                  {isBaseLayer: false});
             wms.roads = new OpenLayers.Layer.WMS("Roads", wmsUrl,
                                              {layers: "topp:roads",
                                               format: "image/png",
@@ -91,8 +107,10 @@
                                                   transparent: "true"},
                                                  {isBaseLayer: false});
 
-            map.addLayers([wms.restricted, wms.roads, wms.archsites]);
 
+            map.addLayers([gmap, gsat, ghyb,
+                           wms.restricted, wms.roads, wms.archsites]);
+
             panel = new OpenLayers.Control.FeatureEditor(wfsUrl,
                                                          "topp:roads",
                                                          "LineString",



More information about the Commits mailing list