[OpenLayers-Users] Is it possible to delete a point using the ModifyFeature control?

Eric Lemoine eric.c2c at gmail.com
Thu May 15 03:14:50 EDT 2008


On Wed, May 14, 2008 at 10:29 PM, Andreas Hocevar
<andreas.hocevar at gmail.com> wrote:
> Pierre GIRAUD wrote:
>>
>> I think Eric is wrong on that point.
>> By hovering a vertex, you can delete it pressing the Del button.
>> Tricky, isn't it ?
>>
>
> I would have thought that it works like that, because it is promised in the
> API doc of Control.ModifyFeature, but it does not:

Indeed, the API doc isn't correct.

We cannot delete polygons et lines with the modify feature control, so
why would we allow deleting points? Maybe you think that the control
should allow deleting features?


>
>   /**
>    * Method: handleKeypress
>    * Called by the feature handler on keypress.  This is used to delete
>    *     vertices and point features.  If the <deleteCode> property is set,
>    *     vertices and points will be deleted when a feature is selected
>    *     for modification and the mouse is over a vertex.
>    *
>    * Parameters:
>    * {Integer} Key code corresponding to the keypress event.
>    */
>
> Also, handleKeypress is only triggered when the point is not selected.

I don't get that. Could you please elaborate?

Thanks,
--
Eric



More information about the Users mailing list