Google v3 MAP API: moving the center between two locations

How can I move a camera from one loc to another loc? I checked the API, but could not find what I want, next to the setCenter method, which directly sets the center to a given location, but I want a smooth switch, not an instant change of center.

+6
source share
1 answer

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

panTo method.

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

+13
source

Source: https://habr.com/ru/post/892117/


All Articles