这里我在一个名为 map
的 div
中有一个 map_canvas
。问题是当我增加 map
的 width
时,一侧的 google map 没有完全呈现。
请帮忙
最佳答案
The width of the map-area is increasing but the right side of the map is not rendering fully.
当你改变div的大小时,触发 map 上的resize事件:
事件
resize - 当 div 改变大小时,开发者应该在 map 上触发这个事件:google.maps.event.trigger(map, 'resize') 。
关于javascript - 谷歌地图没有在 div 中完全呈现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13682514/