google-maps-react default zoom doesn't work with bounds prop

616 views Asked by At

I came across this issue today where if i have bounds set on my map, the zoom prop doesn't work. Basically i have an object with bounds set to the following:

{ "south": -25.5469, "west": 65.45898, "north": 32.587894, "east": 31.3069 }

This basically negates my zoom prop. This is how I'm calling my component.

<Map google={google} initialCenter={avgCenter} zoom={10} bounds={bounds}>

If i have 1, 10 or 1000 as my zoom, it wont change but if I remove my bounds, it works. I think it's stuck to a 2 or 3 zoom by default. Anybody know a work around for this problem? I just want to change the default props, when my map renders I can actually zoom in and out with no problems.

The package I am using is the following Google-Maps-React

0

There are 0 answers