Reputation: 28245
Where is the difference between the panTo
and setCenter
functions in the Google Maps API V3? Both seem to change the center of the map to the given point.
Upvotes: 12
Views: 4063
Reputation: 621
According to the reference:
panTo:
Changes the center of the map to the given LatLng. If the change is less than both the width and height of the map, the transition will be smoothly animated.
setCenter simply changes the center of the map.
Upvotes: 5