On Feb 12, 3:02 pm, Jonathan <[email protected]> wrote: > I'm aware of GDirections and I suppose I could have two text input > fields with two geocoding functions (or somehow accomplish this with > one function?) but I'm not sure how to make the map zoom to include > both points. > > If someone could point me in the right direction, I would definitely > appreciate it.
One geocoding function called twice. The geocoding result handler should push its result on to global array and then a call a "zoomMyMap" function. The "zoomMyMap" function checks the length of the global array, and if it contains two elements, zooms the map. Mike shows that at http://econym.org.uk/gmap/basic14.htm Checking for the availability of two results after each geocode result means it doesn't matter about the order the results are returned in. When the second result arrives, there will be enough data to do the zoom. -- 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.
