-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to recenter map based on marker position? #789
Comments
This is not supported right now. Current workaround could be to change the latitude/longitude for 1 millisecond and then change back to the original position. That should trigger the centering. I think it's a good idea to add it to the triggerResize method.
This would be a breaking change but most people probably want that behavior. |
@amiller29au can i know how you use full screen map. i was wondering how to dot it. |
When you call the triggerResize method of AgmMap, the map gets recentered automaticaly. Closes sebholstein#789 Closes sebholstein#976 BREAKING CHANGES Recentering of the map after a triggerResize call is now the default behavoir. You can create the previous behavoir with triggerResize(false).
Hello. Any plans to do a new release where this issue's fix is included? |
How can this be fixed? |
** Question **
I have implemented a fullscreen option for the map but when I go to the fullscreen and back I call triggerResize() on the map to update the bounds for the map.
However, when going to fullscreen or returning to normal size, the marker is no longer centered on the screen.
How could I trigger the map control to recenter for the given marker position.
angular2 & angular2-google-maps version
Angular: 2.12
Angular2-google-maps: 0.16.0
The text was updated successfully, but these errors were encountered: