Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Max MKMapView Resolution/Zoom Level
The trick to set _forcedMaxZoomLevel no longer works on iOS 14. You get an exception that it is not KVO compliant. The trick with overlay tiles and canReplaceMapContent = true do work, though.
I do not have a tilerenderer, I just need to zoom more for debugging purposes. So this is what I did:
Initialization:
let overlay = MKTileOverlay(urlTemplate: "http://localhost/{z}/{x}/{y}")
overlay.canReplaceMapContent = true
overlay.maximumZ = 30
mapView.addOverlay(overlay, level: .aboveLabels)
_tileRenderer = MKTileOverlayRenderer(tileOverlay: overlay)
and then in the MKMapViewDelegate:
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
I do
return _tileRenderer
There is probably a more elegant way to make a NOOP tile overlay than pointing to localhost but for debugging this seem to work.
The maximum of 30 was just "big enough" to let med see differences on centimeter level.