On Dec 5, 4:53 pm, kmcnet <[email protected]> wrote: > Thanks for the response. Setting the image size did not fix the problem of > displaying off of the map page. How do I dynamically set the zoom of the > map?
You have two things going on at once, so it's not easy. The way you add your directions should zoom the map to fit. BUT at the same time as you are getting directions (which is asynchronous), you are also geocoding destinationaddress. Either could finish first. Currently it appears the directions finish first, so the geocoder callback sets the zoom when it encounters map.setCenter(point, 14); I would suggest setting the map's centre and zoom at the very start (choose something arbitrary but reasonable) and not setting the centre or zoom later on: let the directions do that for you, and just add the marker to the map without centring on it or setting the zoom. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
