[OpenLayers-Users] Problem with removeMarker
Esteban olm
esteban.olm at gmail.com
Sun Mar 16 19:32:19 EDT 2008
Linda, Your code is weong. You need a WHILE, not a FOR
Your List: 0, 30, 45, 45, 45, 45, 30
An example of iteration in your list:
i=0, List[i]=0 <- don't do anithig
Your List: 0, 30, 45, 45, 45, 45, 30
i=1, List[i]=30 <- don't do anithig
Your List: 0, 30, 45, 45, 45, 45, 30
i=2, List[i]=45 <- delete
Your List: 0, 30, 45, 45, 45, 30
i=3, List[i]=45 <- delete
Your List: 0, 30, 45, 45, 45, 30
i=4, List[i]=45 <- delete
Your List: 0, 30, 45, 45, 30
i=5, <- end, out of list
Total: 3 deletes.
Use a while and an i variable
i++ when nothing happens
i no change when delete
2008/3/16, Eric Lemoine <eric.c2c at gmail.com>:
>
> On Sun, Mar 16, 2008 at 6:26 PM, Linda Rawson <linda.rawson at gmail.com>
> wrote:
> > I have to cycle through the marker layer again and again until all the
> > markers are gone. What a performance hit!
>
>
> What wouldn't you follow Huub's recommandation?
> --
>
> Eric
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080317/41e4dcd0/attachment.html
More information about the Users
mailing list