On Dec 5, 12:24 am, Schwarttzy <[EMAIL PROTECTED]> wrote: > I'm trying to create a custom box to use in Google maps but I am > having trouble doing it. I can get it to display and everything but I > can't get the map to pan if it is off the map. How do I that?
Easiest way that occurs to me: 1. Find the pixel coordinates of the box's upper-left corner using GMap2.fromLatLngToContainerPixel and the offset from your marker's location. 2. Find the lat/lon coordinates of the box center using GMap2.fromContainerPixelToLatLng from those pixel coords. I'm assuming your box is of known size. 3. Use GMap2.panTo to recenter the map on those lat/lon coordinates. String --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
