Missing Tiles in MKTileOverlayRenderer

Well, there is a bug in Apple’s MapKit since iOS 13.2, as the folks in developer community say: If you want to use non-Apple maps (e.g. OpenStreetMap®) occasionally tiles are not rendered although you supply the correct data in your sub-class of MKTileOverlayRenderer. There seems to be no obvious systematic but if you scroll around the map you’ll soon find missing tiles. There seems to be no real fix for that problem and your app will not be notified if that happens; the delegate method mapViewDidFinishRenderingMap(mapView:fullyRendered:) will always signal „fullyRendered“ although tiles may be missing.

One proposal for a workaround calls the method overlayRenderer?.reloadData() in the above mentioned delegate method each time the rendering is finished. Indeed, that fixes the problem but its a little bit heavy since every little pan of the map will lead to a flickering update. But it gave me an idea. At least for me, if I notice a missing tile I intuitively try to zoom in or out with the 2-finger gesture. So, my workaround for this problem is to reloadData() if the zoom gesture is finished. That flickers as well but is not as annoying as the flickering after every pan.

Hopefully Apple will fix that bug some time.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert