I am trying to update my map using a GMSCameraUpdate object initiated with fitBounds message. The GMSCorrdinate is constructed using initWithCoordinate:northEast coordinate:southWest. I am expecting to see both northEast and southWest corners on my map after the update, with a 64 pt padding.
This is not always the case. When my northEast and southwester corners are aligned on the map pretty much on top of each other, i.e. the norht-south distance is greater than the east-west distance, the camera zooms in to close, and my corners fall outside of the visible region of the map.
For example, I am trying to update the map with the following:
- North: 51.509979;
- south: 51.505211
- East: -0.129508;
- west: -0.133700
When I check the visibleRegion of the projection after the update, here is what I see (lat/lon):
- Near left 51.505251 / -0.134224
- Near right 51.505251 / -0.128984
- Far left 51.509939 / -0.134224
- Far right 51.509939 / -0.128984
The "North" of the visible region, 51.509939, is to the south of what I have requested, 51.509979. Same with the south.
When my corners are aligned more east-west, everything works fine.
Looks like an implementation bug to me. What do you think?