I figured out it was because I was doing the panToBounds in the draw method of the OverlayView object and didn't realize that that gets called repeatedly during user interaction. I moved it to the onAdd method and it works as expected. Thanks for pointing out that it's not expected behavior.
On Aug 20, 2:18 pm, Rossko <[email protected]> wrote: > > I have a map with an overlay that appears on user interaction. When > > the overlay appears, I am using panToBounds to ensure that the full > > overlay is visible within the viewport. When the overlay appears, > > panToBounds shifts the map to display the full overlay. The problem > > is, if a user drags the map after that so that a portion of the > > overlay is outside the viewport, the map will pan again to bring it > > back into view. > > The API doesn't do that by itself. Something in your code is > repeating the action. We can't see your code. > Seehttp://groups.google.com/group/Google-Maps-API/web/suggested-posting-... -- 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.
