I'm trying to use OpenLayers to edit features of vector data served from a local geoserver. So far, I'm able to pull WMS and WFS layers using OpenLayers from the same geoserver. But now, I'd like enable editing of features of the vector layers. The relevant code section is as shown below:
var ke_admin_vector = new OpenLayers.Layer.Vector("Admin Vector", {
strategies: [new OpenLayers.Strategy.BBOX(), new OpenLayers.Strategy.Save()],
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://HOST_IP:port/geoserver/wfs",
featureType: "ke_admin",
featureNS: "pop_explorer",
srsName: "EPSG:4326"
})
});
var editpanel = new EditingPanel(ke_admin_vector)
map.addControl(editpanel);
ke_admin
is the name of the layer. pop_explorer
is the workspace url. EPSG:4326
is the projection of the layer within geoserver.
When I try accessing this from a browser, firebug complains that EditingPanel is not defined
. Any suggestions on what I may be doing wrong. Thanks in advance.
ANSWERED.
EditingPanel.js, DeleteFeature.js and editing-panel.css
referenced in the tutorial are available at svn.opengeo.org/workshops/projects/openlayers/foss4g_2009/src/…. The workshop assumed the learner had downloaded everything.