Monday, 16 November 2015

gmap js, google map javascript, stop InfoWindow to move map center

if you call:, marker);

The map will move center to try to show the new infoWindow.

if you do this:


this will stop the moving but it will not be able to show the mark

to solve this, you can:

var infoWindow = new google.maps.InfoWindow({disableAutoPan:true});

disableAutoPan:true solve the issue.

No comments:

Post a comment