Need help in understanding why plotCity() is not able to use stories
[i] when creating "html" ? Any workarounds ?

    if (GBrowserIsCompatible()) {
        initialize();
        map = createMap();
        geocoder = new GClientGeocoder();
         for (i=0; i<stories.length; i++) {

            geocoder.getLatLng(stories[i].city, function plotCity
(latlng) {
                var marker = new GMarker(latlng)

                var html =
                    "<a href=\"" + stories[i].website + "\">" +
                    stories[i].company +
                    "</a><br>";

                marker.bindInfoWindowHtml(html)
                map.setCenter(latlng, 1)
                map.addOverlay(marker)
            });
        }
    }

The code fragment (with line numbers) is also available at:

http://pastie.org/343654
--~--~---------~--~----~------------~-------~--~----~
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