The difference between panTo and setCenter

Where is the difference between panTo and setCenter in Google Maps API V3 ? Both seem to change the center of the map to a given point.

+6
source share
1 answer

According to reference :

PANTO:

Changes the center of the map to this LatLng. If this change is less than the width and height of the map, the transition will be smoothly animated.

setCenter just changes the center of the map.

+1
source

All Articles