1

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?

Evgeny Tanhilevich
  • 1,119
  • 1
  • 8
  • 17

1 Answers1

0

Yes. It seems like a bug. Same thing happens to me. Have you already opened a bug report in here?

P.S. Are you embedding the GMSMapView in a UINavigationController and/or in a UITabBarController? Maybe the "bug" is to do with the GMSMapView not occupying the full height of the screen (this is my case).

Community
  • 1
  • 1
ercolemtar
  • 405
  • 5
  • 6
  • I'm having the same problem as well, I've logged a bug for it too just in case. – Mark May 09 '13 at 17:35
  • Could you share the link so that I can follow the status? Thankx – ercolemtar May 10 '13 at 09:27
  • http://code.google.com/p/gmaps-api-issues/issues/detail?id=5361&q=apitype%3AIosSDK%20type%3ADefect&sort=-stars&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Internal%20Stars – Mark May 10 '13 at 18:04
  • I have posted a workaround here: http://stackoverflow.com/a/16217785/2291425. The map occupies the full screen in my app, so the problem should not be related to that. – Evgeny Tanhilevich May 11 '13 at 12:59