google-maps-builder icon indicating copy to clipboard operation
google-maps-builder copied to clipboard

Recenter Marker on Resize

Open baden03 opened this issue 10 years ago • 2 comments

An issue we are running into is that a map with a single marker will be shown centered on page load, but if the page is resized, the marker will not recenter unless the page is refreshed. While this may be by design, it would be great if there was at least a callback that would trigger the recentering of the marker.

Does this exist, or is there a way via JS we can tell the map to recenter dynamically?

This is particularly useful when the map is being loaded in a hidden state, such as a tab or accordion, and based on the available size the map could be resized and recentered.

baden03 avatar Jan 18 '16 11:01 baden03

@DevinWalker I need google map api for further development. Would you please check your email ?

Thanks

nishitlangaliya avatar Aug 06 '18 10:08 nishitlangaliya

@DevinWalker ,

I tried to reproduce case but I found map remains center while resize the window. I have prepare a video of my troubleshoot. So please review it when you get a chance and let me know if I am missing anything.

https://www.useloom.com/share/326da16c374e4716b346b95211aaee07

nishitlangaliya avatar Aug 10 '18 11:08 nishitlangaliya