Thanks Larry and Mike for the answers.
It worked  out for me on my map.

Thanks again for your time you have spend for.

on  function createMarker, I have added " gmarkers.push(marker); "

then I wrote function ;

function myclick(i)
{
        i++;
        GEvent.trigger(gmarkers[i], "click");
}


then called the function like

" html += separator + '<span style="text-align:right;"><a
href="javascript:myclick(\''+ i +'\');">Next Location</a></span>';  "

Hope this helpful to somebody


joban
http://phpqa.blogspot.com


On Feb 10, 12:08 pm, Mike Williams <[email protected]> wrote:
> Store references to your markers in an array, just like you would if you
> were going to build a sidebar.
>
> Build links similar to the ones that you would put in a sidebar, but for
> the next marker, and put them inside your infowindow HTML.
>
> Check if this is the last marker, and if so either don't add the link or
> link back to gmarkers[0].
>
> Something like this (not tested).
>
> var gmarkers = [];
> var maxMarkers = 28;
>
> function createMarker(point,html) {
>   // create the marker
>   var marker = new GMarker(point);
>
>   // store a reference in the gmarkers array
>   gmarkers.push(marker);
>
>   // build the link
>   var n = gmarkers.length;
>   var link = '<br><a href="javascript:GEvent.trigger(gmarkers[' + n +
>              '], \'click\')"> Next </a>';
>
>   // is this the last marker?
>   if (n < maxMarkers) {
>     html += link;
>   }
>
>   // handle the click
>   GEvent.addListener(marker, "click", function() {
>     marker.openInfoWindowHtml(html);
>   });
>   return marker;
>
> }
>
> Wasn't it jey jey who wrote:
>
>
>
>
>
> >Hi
>
> >I have a map and it iss loading contents from an xml file. I am
> >displaying the markers on the map based on one particular order.  I
> >need to to show the next infobox window  from the previously opened
> >infobox window based on the order.
>
> >Any help appreciated !!
>
> >Thanks
>
> >joban
> >http://phpqa.blogspot.com
>
> >No virus found in this incoming message.
> >Checked by AVG -www.avg.com
> >Version: 8.0.233 / Virus Database: 270.10.19/1941 - Release Date:
> >02/09/09 06:50:00
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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