[OpenLayers-Users] ModifyControl Select/Delete Vertex?

Robert Smart r_n_smart at hotmail.com
Tue Feb 26 08:42:38 PST 2013


Hi All,

I'm trying to port some existing functionality into open layers and have 
managed to get most of it working. I'm just stuck on a seemingly simple 
task.

The current code allows a user to highlight a polygon vertex by clicking on 
it (which changes its colour), so that the user can then press a delete 
button to remove the vertex.

Using the modify control I'm able to display the vertices, and even delete 
them if I click on it and then press 'del' on my keyboard, but this is not a 
great solution as there is no visual clue as to what vertex has been 
selected.

So is there a way to highlight or change the colour of a single vertex the 
user has clicked on? is there then a way to remove that vertex via code and 
have the polygon redraw on the screen to suit?

I think this would actually be quite useful as a standard feature as there 
are many cases where one might want to select an individual vertex.

Thanks,

Rob 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130226/a6777a35/attachment.html>


More information about the Users mailing list