I have a WMS service, which is a point layer. Is it possible to drag and drop features of a this service layer through OpenLayers?
-
1Can you tell us what exactly you wish to do? please see this post on tips to improve this question: meta.gis.stackexchange.com/questions/3349/…– Devdatta TengsheCommented May 6, 2014 at 11:46
-
I have a geoserver service with attached postgres table,which contains point data.when any user is marking any point on the map it is getting updated in that table.Now I want to provide editing option for the mapped points,I am able to edit the attributes in the postgres table,but is it possible to change the location of particular point on the map (like drag and drop example of open layers).– pragyaCommented May 29, 2014 at 10:07
-
Please use the edit button beneath your question to revise it with these additional details.– PolyGeo ♦Commented Nov 24, 2014 at 10:09
2 Answers
It is possible, but you need to have the layer also available as WFS feature type. Then you can do something like http://openlayers.org/dev/examples/wfs-protocol-transactions.html. Note: that example shows editing of a polygon layer, but you can do the same with a point layer. The component used to drag/drop points is OpenLayers.Control.ModifyFeature
.
It is not possible to drag points from a WMS point layer. A WMS layer is an image. The input data may be a vector point data source (shapefile for example) but the WMS layer delivered to the web browser through your OpenLayers client is an image.