panTo
的区别在哪里和 setCenter
Google Maps API V3 中的函数?两者似乎都将 map 中心更改为给定点。
最佳答案
根据reference :
泛到:
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 只是改变 map 的中心。
关于google-maps - panTo 和 setCenter 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21002096/