Database Reference
In-Depth Information
How to do it...
Carry out the following steps:
1. Create a new file named wfst.html . Open it and add the <head> and
<body> tags. In the <head> tag, import the OpenLayers library:
<html>
<head>
<title>Consuming a WFS-T with
OpenLayers</title>
<script src="http://openlayers.org/
api/OpenLayers.js"></script>
</head>
<body>
</body>
</html>
2. Add a <div> tag in the <body> tag to contain the OpenLayers map, as
shown in the following code; the map will have a width of 700 pixels and a
height of 400 pixels:
<div style="width:700px; height:400px"
id="map"></div>.
3. Justafterthe <div> tagismadetocontainthemap,addaJavaScriptscript.
Insidethescript,startsetting ProxyHost totheweblocationwhereyoude-
ployedyourproxyscript.Then,createanewOpenLayersmap,asshownin
the following code:
<script type="text/javascript">
// set the proxy
OpenLayers.ProxyHost = "/cgi-bin/
proxy.cgi?url=";
// create the map
var map = new OpenLayers.Map('map');
</script>
Search WWH ::




Custom Search