Your arrays are not global. They are all declared inside function
creerCarte() and therefore they are not visible inside function
changerPosition().
Move the declaration to the global namespace, ie
// CONFIGURATION INITIALE
var lat = 46.41;
var lng = 6.53;
//etc...
// DEFINITION DES MOBILES ET DE LEURS PARAMETRES
var markers = new Array();
//etc ...
That'swhy proper indentation is important! ;-)
--
Marcelo - http://maps.forum.nu
--
On Jun 27, 2:41 pm, Patrice <[email protected]> wrote:
> First I'm French so it's possible that I make some English mistakes...
>
> I`m trying to show on map position of some cars, this positions can be
> changed any time, so markers have to move.
>
> I used to call functions that remove markers from map, and add new
> with new coords indefinitely. But this solution has a major drawback.
> It seems that old markers stay in browser memory, and after some time
> the memory used by the browser starts to grow (seehttp://gmapspower.free.fr
> for the result (the markers don't move because the simulator is not
> on))
>
> That's why I would like to move existant markers instead of deleting
> them and creating new ones. But it doesn't work.
>
> Could you please help me ? I've been searching on the Web for weeks...
>
> Here's the link where you can see my problem
> :http://gmapspower.free.fr/cdc.php
>
> This place is my last hope...
>
> Thank you !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---