Google maps api 3 Google地图信息窗口打开()地图的panTo边缘

Google maps api 3 Google地图信息窗口打开()地图的panTo边缘,google-maps-api-3,Google Maps Api 3,我有这两行 map.panTo(respectiveMarker.getPosition());//Center in map the respective marker infoWindow.open(map, respectiveMarker); 执行infoWindow.open时,贴图平移到边缘。 如果我删除这条线,贴图将按预期平移到标记 有什么想法吗?您应该在信息窗口中将disableAutoPan设置为true,这样会在信息窗口打开时阻止地图移动

我有这两行

map.panTo(respectiveMarker.getPosition());//Center in map the respective marker
infoWindow.open(map, respectiveMarker);
执行infoWindow.open时,贴图平移到边缘。 如果我删除这条线,贴图将按预期平移到标记


有什么想法吗?

您应该在信息窗口中将disableAutoPan设置为true,这样会在信息窗口打开时阻止地图移动