You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
Under the current infobubble.js code the 'autoPan' feature is very basic - simply centering the selected / clicked marker, rather than moving the map just enough to make the infobubble visible.
...you may have to move the map to have the marker near the edge to see the autopan effects.
The part of the code that's problematic is the panToView() function which contains code to
effectively centre the map on the selected pin.
This might be fine for very small maps, but on larger maps is completely unnecessary and frankly has an annoying effect that can't be useful in many circumstances.
Was there a plan to update this part of the code to be more in line with the far superior performance of the standard google.maps.InfoWindow()autoPan feature ?
The text was updated successfully, but these errors were encountered:
PR #14 updates infobubble autopan (which really only centres the map on the clicked marker) to bring it inline with (ahead of ?) the standard google.maps.InfoWindow() autopan functionality:
map is only panned enough for the infobubble window to be visible with an edge margin - as per
adds an autopanMargin option to set the margin between the map edge and the infobubble window (with default = 10px)
see updated code working here: http://jsfiddle.net/goredwards/2cs4puaz/
...feel free to modify the autopanMargin: 15 option in the infobubble definition to see how the margin works (you can even put a -ve margin)
I know that this repository is unmaintained but autopanMargin seems like a very useful option -
does anyone know if there are plans to incorporate such an option in the main Google Maps InfoWindowOptions object?
I'm seeing an excessive amount of left margin and would love to be able to minimize that:
Thanks.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Under the current
infobubble.js
code the 'autoPan' feature is very basic - simply centering the selected / clicked marker, rather than moving the map just enough to make the infobubble visible.Compare the following jsfiddles :
google.maps.InfoWindow()
- http://jsfiddle.net/goredwards/3r7r1zkq/infobubble.js
code - http://jsfiddle.net/goredwards/v9934fqm/...you may have to move the map to have the marker near the edge to see the autopan effects.
The part of the code that's problematic is the
panToView()
function which contains code toeffectively centre the map on the selected pin.
This might be fine for very small maps, but on larger maps is completely unnecessary and frankly has an annoying effect that can't be useful in many circumstances.
Was there a plan to update this part of the code to be more in line with the far superior performance of the standard
google.maps.InfoWindow()
autoPan
feature ?The text was updated successfully, but these errors were encountered: