[OpenLayers-Commits] r3637 - sandbox/tschaub/geojson/examples
commits at openlayers.org
commits at openlayers.org
Fri Jul 6 19:04:13 EDT 2007
Author: tschaub
Date: 2007-07-06 19:04:13 -0400 (Fri, 06 Jul 2007)
New Revision: 3637
Added:
sandbox/tschaub/geojson/examples/geojson-via-wfs.html
Log:
adding an example of GeoJSON via WFS
Added: sandbox/tschaub/geojson/examples/geojson-via-wfs.html
===================================================================
--- sandbox/tschaub/geojson/examples/geojson-via-wfs.html (rev 0)
+++ sandbox/tschaub/geojson/examples/geojson-via-wfs.html 2007-07-06 23:04:13 UTC (rev 3637)
@@ -0,0 +1,38 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>GeoJSON via WFS</title>
+ <style type="text/css">
+ #map {
+ width: 550px;
+ height: 350px;
+ border: 1px solid #ccc;
+ }
+ </style>
+ <script src="../lib/OpenLayers.js"></script>
+ <script type="text/javascript">
+ <!--
+ var map, wms, wfs;
+
+ function init(){
+ OpenLayers.ProxyHost="/sandbox/tschaub/geojson/examples/proxy.cgi?url=";
+ map = new OpenLayers.Map('map');
+
+ wms = new OpenLayers.Layer.WMS("OpenLayers WMS",
+ "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'});
+
+ wfs = new OpenLayers.Layer.WFS("GeoJSON via WFS",
+ "http://sigma.openplans.org:8080/geoserver/wfs?",
+ {typename: "gnis_pop", maxfeatures: 10, outputformat: "json"},
+ {featureClass: OpenLayers.Feature.WFS});
+ map.addLayers([wms, wfs]);
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+ map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
+ }
+ // -->
+ </script>
+ </head>
+ <body onload="init()">
+ <h1>OpenLayers GeoJSON/WFS Example</h1>
+ <div id="map"></div>
+ </body>
+</html>
More information about the Commits
mailing list