[OpenLayers-Dev] removeFeatures - LineString

Pierre GIRAUD bluecarto at gmail.com
Wed Feb 7 11:34:38 EST 2007


I'm not able to reproduce it. In the tests I made, all is working good.

What I've tried is :

 - open http://dev.openlayers.org/sandbox/vector/examples/EditingDemo.html
in a browser,
 - switch the selected vector layer to Vector Layer (in the layer
switcher) in order to be able to draw lines,
 - launch the following script into my firebug console :
vector.removeFeatures(vector.features[vector.features.length - 1]);

The line is removed from the layer features and cleared on the screen
(removed from the display).

Pierre


On 2/2/07, Ben Brehmer <bbrehmer at refractions.net> wrote:
> Hi all,
>
> I'm just working with the vector branch and noticed that removeFeatures
> deosn't seem to work that well for LineString.
> Reproduction steps: Draw a LineString with mouse clicks on a vector
> layer. Trigger removeFeatures with the just-drawn LineString as a
> parameter. You will notice the line between the last two vertices
> remains as well as all the vertices.
>
> Thanks,
>
> Ben
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



More information about the Dev mailing list