Hallo Mike,
thanks for helping,
i find out another way.
map.addOverlay(mm_circles[i]);
if (mm_circles[mem_i]) {
map.removeOverlay(mm_circles[mem_i]);
}
mem_i=i;
Best regards
Michael
Mike Williams schrieb:
> Wasn't it mima who wrote:
>
>> for (var ii=0; i<mem_circles.length; ii++) {
>> map.removeOverlay(mem_circles[ii]);
>> mem_circles.pop;
>> }
>>
>
> 1. That loop either never starts or never ends. If i happens to be less
> than mem_circles.length it's an infinite loop.
>
> 2. Array.pop() is a method, not a property. Mentioning mem_circles.pop
> rather than calling mem_circles.pop() doesn't change the length of the
> array.
>
> 3. If you were to use mem_circles.pop(), and use ii consistently, then
> mem_circles.pop() would pop the *last* element in the array, when you
> have processed the *first* element, thus deleting information that
> you've not processed.
>
> 4. It's really not a good idea to change the length of the array inside
> the loop that's reading it. It confuses some computer languages, and
> most computer programmers.
>
>
> Four issues in four lines. Perhaps you should consider hiring someone to
> write your code.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---