> i have got a problem. With the following code i put serval Markers on the > map. Then i tried to > fit the map that all markers are shown in the window. > > i tried this with the fitBounds() method. But it don“t work?
Because you are geocoding your markers, it doesn't happen in that order. Geocoding is asynchronous, and takes time. You fire off several geocoding requests. You fit the map to the (empty) bounds. Later on, some of the geocoding results come back and the bounds is populated, but its too late. Geocoding many addresses at every page load is a dumb idea, see http://code.google.com/apis/maps/articles/geocodestrat.html -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
