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
Issue description
When trying to save bounds to URL in the form of 2 coordinates (north east, south west) we have found out a bug when trying to recreate bounds on state reload.
Function map.fitBounds() sets the viewport to contain the bounds. But map.getBounds() function returns the viewport bounds with some extra margin (note that this is normal behaviour and no bug). The enlarged bounds no longer fits in the previous viewport, so the map zooms out.
Google Maps API v3 now supports a second padding argument that specifies the amount of padding to include around the bounds you specify.
Would it be possible to introduce an fitBoundsPadding directive so that this new padding argument could be used?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue description
When trying to save bounds to URL in the form of 2 coordinates (north east, south west) we have found out a bug when trying to recreate bounds on state reload.
Function map.fitBounds() sets the viewport to contain the bounds. But map.getBounds() function returns the viewport bounds with some extra margin (note that this is normal behaviour and no bug). The enlarged bounds no longer fits in the previous viewport, so the map zooms out.
Google Maps API v3 now supports a second padding argument that specifies the amount of padding to include around the bounds you specify.
Would it be possible to introduce an fitBoundsPadding directive so that this new padding argument could be used?
Additional information aboute the bug/feature on https://stackoverflow.com/questions/8170023/google-maps-api-3-zooms-out-on-fitbounds
angular2 & angular-google-maps version
1.0.0-beta.3
The text was updated successfully, but these errors were encountered: