Brian, That did it- thank you! It never occurred to me that I could pan to something other than just "marker.getLatLng()"
-Nathan On Apr 30, 2:00 pm, Brian P <[email protected]> wrote: > Just a thought--maybe you can calculate a good GLatLng value using the > LatLng of the marker and getBounds() to take care of what zoom level > you're at. > > Say, find the bottom Lat and the top Lat in getBounds(), calc the > difference, choose how far above the marker you want the center as a > fraction of the map (say 30%?), and add that Lat value to the marker's > Lat value for panTo(). > > Should be pretty do-able, yes? > > -Brian > > On Apr 30, 2:41 pm, nathan <[email protected]> wrote: > > > In this case saving the map position doesn't really work for me, > > because I'll have ten markers on the map - when the user clicks one of > > them, the map needs to pan to the given marker, but rather than center > > on the marker (as I was originally using panTo to do), the marker will > > have to sit at the bottom-middle of the map. > > > On Apr 30, 1:24 pm, Rossko <[email protected]> wrote: > > > > > If you pull the map around so the marker is no longer at the bottom of > > > > the map, and click the marker, it will reset back to it's default > > > > location at the bottom-center. > > > > Have you looked at this part of the documentation > > > -http://code.google.com/apis/maps/documentation/reference.html#GMap2.s... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
