Look at again at some of Mike's turorials.

A common way to store markers is to have a global array variable,
which in your page would go with your declarations of

    var map = null;
    var geocoder = null;
    var markerArray  = [];  // ADDED (use whatever name you want)

Then each time you create a marker, push it into this array:

     var marker = createMarker(point, name, address, type);
     markerArray.push(marker); // ADDED

Now you have a global array of markers, stored in order of creation.

Individual markers stored in this fashion are accessed by their index
numbers, e.g.:
     var thisMarker = markerArray[3];   // Access the fourth marker in
the array

There are lots of ways to store markers within a script; I sometimes
prefer to use associative arrays, which employ a unique name or id for
each marker.

     markerArray['SantaCruzNaturalBridgesWindSurfSpot'] = marker;

Just depends what you want to do with the array of markers, how you
expect to access them, etc

HTH



On May 10, 4:11 am, wakey <[email protected]> wrote:
> Thank you for both of your replies.
>
> Ralph, I did follow that tutorial but still cannot seem to get it to
> work.
>
> String, that certainly looks like a decent method. I'm just a little
> unsure about how to pass my markers into an array when they are being
> read in from the XML file. Any suggestions on the route I should take
> with this?
>
> Thanks,
> Tom
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to