Database Reference
In-Depth Information
// create a save tool
var save = new OpenLayers.Control.Button({
title: "Save Features",
trigger: function() {
saveStrategy.save();
},
displayClass: "olControlSaveFeatures"
});
10. Finally,addthetoolstothepanel,includinganavigationcontrol,andthepan-
el as a control to the map, using the following code:
// add tools to panel and add it to map
panel.addControls([
new OpenLayers.Control.Navigation(),
save, draw
]);
map.addControl(panel);
11. Your HTML file should now look like the wfst.html file contained in the
chp09 directory.Deploythisfiletoyourwebserver(thatis,Apachehttpdor
IIS). If you are using Apache httpd in Linux, you could copy the file to the
data directory under /var/www , whereas if you are using Windows, you
could copy it to the data directory under C:\ms4w\Apache\htdocs (cre-
atethe data directoryifitisnotalreadyexisting).Then,accessitusing ht-
tp://localhost/data/wfst.html .
12. Openthewebpageusingyourfavoritebrowserandstartaddingsomepoints
tothemap.Now,clickonthe Save buttonandreloadthepage;thepreviously
addedpointsshouldstillbethereastheyhadbeenstoredintheunderlying
PostGIS table by WFS-T, as shown in the following screenshot:
Search WWH ::




Custom Search