[OpenLayers-Dev] removeFeatures - LineString

Ben Brehmer bbrehmer at refractions.net
Wed Feb 7 12:27:41 EST 2007


Thank you for looking into this.

I must have been using an outdated version of the vector branch as 
everything seems to be working after grabbing a fresh copy from SVN this 
morning.

Thanks again,

Ben


Pierre GIRAUD wrote:
> 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