MapKit OSX for animation and MKMapCamera.altitude

Togther with MKMapSnapshotter, Mapkit provides all the tools to create animations, respectively image sequences.

For example:


https://youtu.be/yub8oVTA2fw


For this example the heading property of the mkMapCamera was animated. The movement

of the camera looks smooth. (That's fine)

In the next example the MKMapView.centerCoordinate was animated.


https://youtu.be/QY7Pmg5oE2M


You may have noticed the jumps during the movement of the camera. (That's bad)

The MKMapView.camera gets automatic updates.

(Animation of the MKMapCamera.centercoordinate directly

has the same effect) The jumps may rely on the MKMapCamera.altitude property.

Because every change in centercoordinate the altitude of the camera is also updated.

Altitude is defined as meters above ground and consequently the camera seems to follow the maps

surface. Interestingly, if the animation is made with mapkits own animator, it is

possible to move from A to B without height-changes.


https://youtu.be/x7SzU20BJPM


(The example was made with a NSView-Screencapture)


Unfortunately the snapshotter cannot be used to get the frames because

the camera is updated during snapshot-options preparation. This causes (?)

also a correction (or reset) of the altitude property and thus the jump in the animation.

So here is my question/suggestion.


Would it be nice to have a MKMapCamera.aboveMeanSeaLevel property?

Is there a workaround to get a moving camera in altitude above sea-level, i.e

suppressing the altitude update?


Thanks for any suggestions!

  • Hi,

    I am having the same problem on iOS 5 years later! Have you found any solution?

    Thanks! Fabio

Add a Comment

Replies

Hi,

I have exactly the same problem, random jumps during animation.


Did you get anywhere with this?

Any help would be more than appreciated.

Sandro

Have the same issue on iOS