Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript google map setcenter and setzoom with animation

I am using google map api in javascript, i need to change zoom and center by the value coming from restful service and i can do that with setCenter and setZoom functions.

But the problem is that, map is reloading and my boss want it to focus that location with an animation not by reloading map is there anyway for doing so?

like image 952
bdogru Avatar asked Nov 01 '13 12:11

bdogru


1 Answers

The method setCenter reloads the map. For disabling map reloading and enabling the animation, use the panTo method: Map.panTo Developers Documentation

like image 190
akajack Avatar answered Sep 23 '22 10:09

akajack