On Feb 28, 1:37 pm, Jonathan <[email protected]> wrote: > Hi! > > My apologies for posting the same question a month or two ago, but > I've made some progress, and also read the posting guidelines, and > think that I should give it a second try since I didn't post my code > last time. > > I would like to have the user enter two addresses -- in this case, a > "home address" and a "work address." I do not want routing > information. I just want to take the two input fields form the user, > geocode the points, and have the map pan so that the two points are > visible. > > I found an example for the map panning that I can try, but I'm still > stuck on what would be the best way to simply geocode two points from > user input. > > Right now I have it set to run two different functions when the > "submit" button is pressed, but I'm sure there is an easier way. > Also, the html is passed to the info window on only the first address, > but not the second. > > I have a feeling I need a global array, and then I need a function > that cycles through the points, sort of like what happens on the > examples that read point information from an XML file or database. > > I can't seem to put everything together, however. > > If anyone can take a look and give me a few ideas on what I can do, > please let me know. > > I definitely appreciate the help. I'm new to JavaScript for the most > part, but I've made it this far.. > > Thanks! > > http://mysite.du.edu/~jharahus/BTWD/index.html
It looks to me like you just need to center and zoom the map to fit the data, see this page from Mike Williams' tutorial: Part 14 Fitting the map zoom to the data http://econym.org.uk/gmap/basic14.htm -- Larry -- 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.
