Google Maps v3 - can I ensure smooth panning every time?

后端 未结 6 1437
醉梦人生
醉梦人生 2021-02-01 20:49

My map has several hundred markers within a city. Usually no more than a 20 mile radius. I\'ve read through the documentation and haven\'t found a way to set the init to automat

6条回答
  •  孤独总比滥情好
    2021-02-01 21:18

    See this other SO answer about using javascript's setInterval function to create a periodic function that calls panBy on your map: Can Google Maps be set to a slow constant pan? Like a globe revolution?

    This can be used to pan the map by x pixels on each call to panBy, allowing you to slow down the panBy rate (since you are only telling gmaps to panTo a short distance).

提交回复
热议问题