I\'ve created a quite complex store locator of sorts. The user enters their zip and a table returns results with corresponding markers on a map. They can page through result
Make sure there are no CSS animations on the width or height of your map. The animations interfere with the zoom behaviour of fitBound()
I spent most of the day on this problem yesterday, and I encountered this StackOverflow post at least a dozen times. But I eventually had to find the problem the hard way on my own.
Deleting the transition: all 0.5s ease;
line below fixed it for me.
.google-map {
width: 100%;
height: 0px;
transition: all 0.5s ease;
}
.google-map.loaded {
height: 400px;
}