On Feb 3, 7:33 pm, Jeremy <[email protected]> wrote: > I am working on a store-locator-like app, and I am struggling to > figure out how to adjust the "viewing window" on the map to show the > user's location and top three closest locations. I am sure I'm > missing something simple, but I can't figure out how to accomplish > this. > > My current solution, which obviously doesn't work, looks something > like: > // get map > // set center - user's location > // get map, get bounds obj from map, extend bounds to closest location > #1 > // get map, get bounds obj from map, extend bounds to closest location > #2 > // get map, get bounds obj from map, extend bounds to closest location > #3 > > The idea was supposed to be that by "extending" the bounds (viewing > window?) of the map to cover the three closest locations, that I would > end up with a map showing the user's location and those covered > locations. This does not appear to work however. > > Help please?
Link please? http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines?hl=en (I know it doesn't work, I don't have any problem starting with an empty GLatLngBounds object and extending it with points, then using it to set the center and zoom for the map). I assume you have seen Mike Williams' tutorial on how to do that: 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 -~----------~----~----~----~------~----~------~--~---
