Altitude for MKAnnotation

In MapKit, the MKAnnotation takes a CLLocationCoordinate2D. However, in 3D/Flyover mode, the user marker has a height position on the map.

We are currently plotting points which have altitude, speed, heading, etc, and I have a method for creating a CLLocation with this information. What I'm trying to figure out is if there's a way to pass that information along to the MapKit rendering engine / annotations / AnnotationViews to recognize and show when in 3D mode. Is there any support for that currently?

As you identified, annotations are specified using a 2D geographic coordinate, represented by CLLocationCoordinate2D. There aren't any APIs that add a third dimension to this information for the system to use in positioning the annotation on the map. If you'd like us to consider adding this functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.

— Ed Ford,  DTS Engineer

Thanks Ed - are there any other marker types which are capable of showing vertical position / altitude data on the map in 3D mode? Obviously the self marker can, so I'm wondering if there's another type that I'm missing.

are there any other marker types which are capable of showing vertical position / altitude data on the map in 3D mode?

There isn't API to do so for annotations, which is what I presume you mean by marker.

For overlays, there also isn't API for you to create overlays with data for a third dimension, with one exception — if you ask MapKit for a route between locations using the MKDirections family of API, the route returned to you may display with elevation info, such as placing the route polyline on a bridge. The following screenshot is taken from a sample code project, though I adjusted the position of the map slightly to illustrate my point. At the top of the screen, you can see the route line going across a bridge, and then down through a tunnel, and finally passing underneath a highway overpass.

As I said before, if you'd like us to consider more APIs including elevation, please file enhancement requests using Feedback Assistant and let us know how you'd use such APIs!

— Ed Ford,  DTS Engineer

Altitude for MKAnnotation
 
 
Q