How do I force redraw with Google Maps API v3.0?

百般思念 提交于 2019-11-27 21:07:23

google.maps.event.trigger(MapInstance,'resize') is working fine for me, put it at the begin of the function fitMap .

What you are missing:

currently(not in the code posted above, in your live-code), you call resizeWindow on each step .

When you call this function on step the function will be called before the animation for the current step has finished. The result is that resizeWindow will not be called when the complete animation has been finished, there will be e.g. a margin on the right side of the map.

Solution: call resizeWindow also on the complete-callback of the animation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!