Post

Replies

Boosts

Views

Activity

MKTileOverlay not displayed on iOS 14 device, but on iOS 14 Simulator. Only with canReplaceMapContent set to YES it will display on devices.
I have an standard Open Street Map Overlay implemented. It works perfect on the Simulator and when I set explicitly canReplaceMapContent to YES on the overlay. If I set it to NO, it will not display on any iOS 14 device. iOS 13 devices were able to display it. I develop the app in Objective C, the overlay was working for many iOS releases before. Standard MKTileOverlay, standard URL tile.openstreetmap.org: &#9;_tileOverlay = [[MKTileOverlay alloc] initWithURLTemplate:@"https://<OSM URL>/{z}/{x}/{y}.png"]; &#9;_tileOverlay.canReplaceMapContent = NO; &#9;[_mapView addOverlay:_tileOverlay level:MKOverlayLevelAboveLabels]; Standard MKTileOverlayRenderer: (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id<MKOverlay>)overlay { &#9;if ([overlay isKindOfClass:[MKTileOverlay class]]) { &#9;&#9;return [[MKTileOverlayRenderer alloc] initWithOverlay:overlay]; &#9;} Having to set canReplaceMapContent to YES on the tile overlay leads to some flickering, which would be easy to avoid setting it to NO, but setting NO leads to only grey tiles, resp. no tiles drawn at all. Any ideas?
5
0
1.9k
Jan ’21