I\'m working with multiple map markers. Currently I use map.fitBounds(bounds); in my JavaScript to resize the map. bounds contains multiple LatLng
map.fitBounds(bounds);
LatLng
I have found the solution.
Instead of doing a single
bounds.extend(myLatLng)
Everytime you add a myLatLng to your bounds, do these actions
bounds = map.getBounds(); bounds.extend(results[0].geometry.location); map.fitBounds(bounds);
Hope this helps anyone!