Problem: The MKPolyline is not displayed on the screen in the scenario described below.
Using Swift I have added a MapKit MapView MKTileOverlay and try add, and display, a Polyline on top of it using:
Above mentioned works OK on my Xcode IOS 14.1 simulator and on IOS 13.7 hardware. It FAILS on IOS 14.1 hardware, both on iPhone (for example iPhone XS) and iPad.
Debugging info:
MapView.overlays (let overlays = mapView.overlays) shows that the 2 expected overlays are present, one MKTileOverlay at overlays[0] and the MKPolyline on overlays[1] so that is good. But as stated above the MKPolyline fails to show on IOS 14.1 iPhone and iPad. I am using the regular out of the box renderer; MKPolylineRenderer(overlay: overlay)
Also:
When I display the MKPolyline without adding the MKTileOverlay it works OK in all cases.
I am using Xcode 12.1 to build and run the code.
Question1: Is this a known bug?
Question2: What is the solution ?
Using Swift I have added a MapKit MapView MKTileOverlay and try add, and display, a Polyline on top of it using:
mapView.addOverlay(tracklogPolyline)
mapView.addOverlay(tracklogPolyline, level: MKOverlayLevel.aboveLabels)
Above mentioned works OK on my Xcode IOS 14.1 simulator and on IOS 13.7 hardware. It FAILS on IOS 14.1 hardware, both on iPhone (for example iPhone XS) and iPad.
Debugging info:
MapView.overlays (let overlays = mapView.overlays) shows that the 2 expected overlays are present, one MKTileOverlay at overlays[0] and the MKPolyline on overlays[1] so that is good. But as stated above the MKPolyline fails to show on IOS 14.1 iPhone and iPad. I am using the regular out of the box renderer; MKPolylineRenderer(overlay: overlay)
Also:
When I display the MKPolyline without adding the MKTileOverlay it works OK in all cases.
I am using Xcode 12.1 to build and run the code.
Question1: Is this a known bug?
Question2: What is the solution ?