I think you'll be fine, if you change your code that way:

         for (i=0; i<stories.length; i++) {

                new_function(stories[i]);
        }

and do this
 
        function new_function(current_story) {
            geocoder.getLatLng(current_story.city, function plotCity
(latlng) {
                var marker = new GMarker(latlng)

                var html =
                    "<a href=\"" + current_story.website + "\">" +
                    current_story.company +
                    "</a><br>";

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

or in some way like this. Interestingly I had exactly the same issue 
last night (in another context of course). Doing it this way, solved my 
problems. Sometimes the asynchronous nature of those kind of programming 
may be overseen easily.

Regards

>   

--~--~---------~--~----~------------~-------~--~----~
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