【发布时间】:2010-09-06 11:09:04
【问题描述】:
我有这两行
map.panTo(respectiveMarker.getPosition());//Center in map the respective marker
infoWindow.open(map, respectiveMarker);
执行 infoWindow.open 时,地图会平移到边缘。 如果我删除这条线,地图会按预期平移到标记处。
有什么想法吗?
【问题讨论】:
我有这两行
map.panTo(respectiveMarker.getPosition());//Center in map the respective marker
infoWindow.open(map, respectiveMarker);
执行 infoWindow.open 时,地图会平移到边缘。 如果我删除这条线,地图会按预期平移到标记处。
有什么想法吗?
【问题讨论】:
您应该在 InfoWindow 中将 disableAutoPan 设置为 true,这样会在 infowindow 打开时阻止地图移动。
【讨论】: