MicheleBertoli / react-gmaps

A Google Maps component for React.js
http://react-gmaps.herokuapp.com/
MIT License
317 stars 68 forks source link

Zoom level according to markers #92

Closed umairfarooq44 closed 7 years ago

umairfarooq44 commented 7 years ago

I want to make all the markers visible on the map. How can I set zoom level automatically to make all markers visible on the map all the time, regardless of the distance between markers and no. of markers?

MicheleBertoli commented 7 years ago

In the onMapCreated callback you receive the instance of the map, at that point you should be able to follow this: http://stackoverflow.com/a/19304625/1712895 Please let me know if you need more help.

umairfarooq44 commented 7 years ago

Thanks a lot for providing solution. My issue has been solved. Please close this issue