> I have a map with a gmarker moving in it in intervals of 5 seconds (as > if it was a car moving through a route). The question is: can I know > when the marker comes out of the map so therefore I can pan the map to > the position where the marker is at that moment?
Yes. When you move the marker, check to see if its new position still lies within the bounds of the map viewer. http://code.google.com/apis/maps/documentation/reference.html#GMap2.getBounds http://code.google.com/apis/maps/documentation/reference.html#GBounds.containsPoint Alternatively, just pan the map to the new centre anyway. http://code.google.com/apis/maps/documentation/reference.html#GMap2.panTo -- 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=.
