【问题标题】:Google maps info window open() panTo edge of mapGoogle 地图信息窗口 open() panTo 地图边缘
【发布时间】:2010-09-06 11:09:04
【问题描述】:

我有这两行

map.panTo(respectiveMarker.getPosition());//Center in map the respective marker
infoWindow.open(map, respectiveMarker);

执行 infoWindow.open 时,地图会平移到边缘。 如果我删除这条线,地图会按预期平移到标记处。

有什么想法吗?

【问题讨论】:

    标签: google-maps-api-3


    【解决方案1】:

    您应该在 InfoWindow 中将 disableAutoPan 设置为 true,这样会在 infowindow 打开时阻止地图移动。

    【讨论】:

      猜你喜欢
      • 2011-11-07
      • 1970-01-01
      • 1970-01-01
      • 2013-05-15
      • 2016-04-04
      • 1970-01-01
      • 2011-02-24
      • 2017-09-29
      相关资源
      最近更新 更多