[OpenLayers-Dev] Option to disable virtual vertices in the
ModifyFeature control
Casper Børgesen
cbo at le34.dk
Thu Feb 9 05:28:38 EST 2012
I have many situations where I would like to modify geometry, but preserve the number of vertices. As far as I can see that is not possible using the current ModifyFeature control.
Would it be inappropriate to incorporate an option to disable/enable the use of virtual vertices?
Looking at the code I only see one crucial place where checking this option is required, in collectVertices() (line 680) in ModifyFeature.js:
// add virtual vertices in the middle of each edge
if(geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint") {
to
// add virtual vertices in the middle of each edge
if(geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint" && control.disableVirtualVertices == false) {
I use this extension in my project, but for version compability I would prefer to have it incorporated in OpenLayers - if it is appropriate J
Regards Casper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120209/50901c2a/attachment.html
More information about the Dev
mailing list