Oomph / MacMapKit

MapKit Framework for the Mac
BSD 3-Clause "New" or "Revised" License
256 stars 43 forks source link

[mapView setRegion:routeRegion animated:YES] gives different results when animated:NO is used #10

Open tevendale opened 12 years ago

tevendale commented 12 years ago

[mapView setRegion:routeRegion animated:YES] scrolls/zooms the map to a different view to that when using animated:NO in the same function.

It looks like the centre point of the map is moved to the middle of the lower (southern) edge of the map with animate:YES is used. When animate:NO is used, the map is drawn as expected.

I've modified the Demo app in MacMapKit to illustrate this - download from: http://www.yellowfield.co.uk/macmapkit/MacMapKit-Animate_Issue.zip

On the main screen there's two additional buttons, one each for animate:YES and animate:NO. Clicking each button illustrates the problem.

schneim commented 11 years ago

I have noticed this behavior also. I think it it has to do with the usage of Google Maps API panToBounds for the animation. I have not figured out yet, why panToBounds does not work as we expect.

Markus