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>
1 Answer 1
AFAIK WMS is not editable in a web client and so with OpenLayers. Maybe you were thinking about the WFS-T protocol which is editable instead. Here's a WFS Transaction Example with OpenLayers.
-
1Here is a WFT-T tutorial for ArcGIS Server v10.1, resources.arcgis.com/en/help/main/10.1/index.html#//….artwork21– artwork212013年10月11日 20:00:41 +00:00Commented Oct 11, 2013 at 20:00
-
@afalciano so, I created WFS service using ArcGIS server 10 but i couldn't use it in openlayers . In fact i couldn't set some parameters such as featureNS . in detail i created a WFS from MXD. In my MXD I have a shapefile named "turkey_wgs". every samples in the internet uses geoservernot arcgis server . thanks for advanceBBG_GIS– BBG_GIS2013年10月12日 16:05:41 +00:00Commented Oct 12, 2013 at 16:05
-
1Note that WFS-T is different from a WFS. Have you followed the tutorial provided by @artwork21 ? See also: gis.stackexchange.com/questions/20814/gis-web-api-wfs-t-editAntonio Falciano– Antonio Falciano2013年10月12日 16:23:24 +00:00Commented Oct 12, 2013 at 16:23
-
then i should change the arcgis version from 10 to 10.1BBG_GIS– BBG_GIS2013年10月12日 16:32:41 +00:00Commented Oct 12, 2013 at 16:32
-
No, you need to change the tutorial version from 10.1 to 10: help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/…Antonio Falciano– Antonio Falciano2013年10月12日 16:49:05 +00:00Commented Oct 12, 2013 at 16:49
Explore related questions
See similar questions with these tags.