Search code examples
iosmkmapviewmapkitmkoverlay

MKOverlay dismissing under buildings


I'm currently working with MKOverlays in the Apple MapKit. I try to draw rooms inside of buildings and when I put the map into 3D mode the rooms dismiss and are displayed below the buildings in the map.

Here's how I add them to the map:

let overlays = ETS.Map.shapes(shapes, forFloor: floor)
self.mapView.addOverlays(overlays, level: .aboveLabels)

I also tried level: .aboveRoads.

Here are two pictures how it looks like:

Shows the room on top of the building Shows the room hidden behind the building when map turns to 3D mode


Solution

  • Think about sea levels when working with MKOverlays in a "3d" environment. Technical notes in the answer to this question: How do I show MKOverlay above MKAnnotations?