I'm new to openlayers. I'd like to edit a feature layer of wms service in openlayers.
I created a wms service using ArcGIS server 10. I couldn't use the wms layers to edit using the openlayers editor. Is there any solution to set layers of the wms service (ex: layer 1 of wms service) to edit in openlayers? In other words, how can I set the wms layer to OpenLayers.Control.EditingToolbar()
?
<!DOCTYPE html>
<html>
<head>
<title>Creating a simple map</title>
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8">
<!-- Include OpenLayers library -->
<script type="text/javascript"
src="http://openlayers.org/api/2.11/
OpenLayers.js"></script>
<script
src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.
ashx?v=6.2&mkt=en-us"></script>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script type="text/javascript">
function init() {
var map = new OpenLayers.Map("rcp1_map");
map.addControl(new OpenLayers.Control.LayerSwitcher());
// Add a WMS layer
var wms = new OpenLayers.Layer.WMS("test",
"http://.../ArcGIS/services/test/MapServer/WMSServer",
{
layers: '0,1,2,3,4,5,6',
transparent: "true",
format: 'image/png'
},
{
isBaseLayer: false
}
);
var ve_shaded = new OpenLayers.Layer.VirtualEarth(
"Shaded",
{type: VEMapStyle.Shaded}
);
var ve_aerial = new OpenLayers.Layer.VirtualEarth(
"Aerial",
{type: VEMapStyle.Aerial}
);
var ve_road = new OpenLayers.Layer.VirtualEarth(
"Road",
{animationEnabled: false}
);
var vector_layer = new OpenLayers.Layer.Vector('VectorLayer')
map.addLayers([vector_layer,wms,ve_shaded, ve_aerial, ve_road]);
map.setCenter(new OpenLayers.LonLat(54, 32),4)
map.addControl(new OpenLayers.Control.EditingToolbar(????));
}
</script>
</head>
<body onload="init()">
<div id="rcp1_map" style="width: 100%;
height: 100%;"></div>
</body>
</html>