开发者

Google maps info window open() panTo edge of map

开发者 https://www.devze.com 2023-01-15 04:00 出处:网络
i have these two lines map.panTo(respectiveMarker.getPosition());//Center in map the respective marker

i have these two lines

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

When infoWindow.open is executed the map pans to the edge. If i remove this line 开发者_开发问答the map pans to the marker as expected.

Any ideas?


You should set disableAutoPan to be true in the InfoWindow and that will stop the map from moving when the infowindow is open.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号