Updating the wfs-states example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+26
-44
@@ -1,45 +1,27 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
<title>WFS: United States (GeoServer)</title>
|
<title>WFS: United States (GeoServer)</title>
|
||||||
<script src="../lib/OpenLayers.js"></script>
|
<script src="../lib/OpenLayers.js"></script>
|
||||||
<script type="text/javascript">
|
<script src="wfs-states.js"></script>
|
||||||
var map, layer;
|
</head>
|
||||||
|
<body onload="init()">
|
||||||
function init(){
|
<h1 id="title">WFS United States (GeoServer) Example</h1>
|
||||||
OpenLayers.ProxyHost="proxy.cgi?url=";
|
<div id="tags"></div>
|
||||||
map = new OpenLayers.Map('map', {controls: [ new OpenLayers.Control.PanZoom(), new OpenLayers.Control.Permalink(), new OpenLayers.Control.MouseDefaults() ]} );
|
<p id="shortdesc">
|
||||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
Shows the use of the WFS United States (GeoServer).
|
||||||
"http://labs.metacarta.com/wms-c/Basic.py",
|
</p>
|
||||||
{layers: 'basic'} );
|
<div id="map" class="smallmap"></div>
|
||||||
map.addLayer(layer);
|
<div id="docs">
|
||||||
|
<p>
|
||||||
layer = new OpenLayers.Layer.WFS( "States WFS",
|
This example shows the basic use of a vector layer with the
|
||||||
"http://sigma.openplans.org/geoserver/ows",
|
WFS protocol.
|
||||||
{ typename: 'topp:states' } );
|
</p>
|
||||||
map.addLayer(layer);
|
<p>
|
||||||
|
See the <a href="wfs-states.js" target="_blank">wfs-states.js
|
||||||
map.zoomToExtent(new OpenLayers.Bounds(-140.444336,25.115234,-44.438477,50.580078));
|
source</a> to see how this is done.
|
||||||
}
|
</p>
|
||||||
</script>
|
</div>
|
||||||
</head>
|
</body>
|
||||||
<body onload="init()">
|
|
||||||
<h1 id="title">WFS United States (GeoServer) Example</h1>
|
|
||||||
|
|
||||||
<div id="tags">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p id="shortdesc">
|
|
||||||
Shows the use of the WFS United States (GeoServer)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div id="map" class="smallmap"></div>
|
|
||||||
|
|
||||||
<div id="docs"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
var map;
|
||||||
|
OpenLayers.ProxyHost = "/proxy/?url=";
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
map = new OpenLayers.Map("map");
|
||||||
|
|
||||||
|
var base = new OpenLayers.Layer.WMS("OpenLayers WMS",
|
||||||
|
"http://labs.metacarta.com/wms-c/Basic.py",
|
||||||
|
{layers: "basic"}
|
||||||
|
);
|
||||||
|
map.addLayer(base);
|
||||||
|
|
||||||
|
var wfs = new OpenLayers.Layer.Vector("States", {
|
||||||
|
strategies: [new OpenLayers.Strategy.BBOX()],
|
||||||
|
protocol: new OpenLayers.Protocol.WFS({
|
||||||
|
url: "http://demo.opengeo.org/geoserver/wfs",
|
||||||
|
featureType: "states",
|
||||||
|
featureNS: "http://www.openplans.org/topp"
|
||||||
|
})
|
||||||
|
});
|
||||||
|
map.addLayer(wfs);
|
||||||
|
|
||||||
|
map.zoomToExtent(new OpenLayers.Bounds(-140.4, 25.1, -44.4, 50.5));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user