[OpenLayers-Dev] Option to disable virtual vertices in the ModifyFeature control

Frederic Junod frederic.junod at camptocamp.com
Thu Feb 9 08:31:14 EST 2012


I had to do the same long time ago but never opened a feature request.

See: https://github.com/openlayers/openlayers/pull/209

Regards,

fredj

On Thu, Feb 9, 2012 at 11:28 AM, Casper Børgesen <cbo at le34.dk> wrote:
> 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
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>



-- 
Frédéric Junod
Camptocamp SA


More information about the Dev mailing list