Hello,

I am facing an issue on markers. I have to show multiple markers on a
page, so I used below code:

for (var i = 0; i < 10; i++)
    {
      var marker1 = new GMarker(new GLatLng(37.4419*i, -122.1419*i));

      GEvent.addListener(marker1, "click", function() {

      marker1.openInfoWindowHtml("Some information on pin   "+
i);
      });

      map.addOverlay(marker1);
    }

I got 10 markers on the page, but when I click on any marker, only a
single marker is pointed and a pop-up window opens on that particular
marker.
For example, I click on any marker (say marker no. 2), then it takes
me on marker no. 10 everytime and displays its information.
I have to add 10 different markers on page with different information.
Tell me how can I solve this problem.

Please reply me asap.

Regards,
Vaibhav
--~--~---------~--~----~------------~-------~--~----~
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