Post

Replies

Boosts

Views

Activity

Reply to 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.
Aug ’21
Reply to SwiftUI Table column widths cannot be saved
How? I cannot see how to read the width and I cannot see how to set width? I can fix the width but then the user cannot resize the columns. Are there any way to achieve this with any other components in SwiftUI?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to 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.
Replies
Boosts
Views
Activity
Aug ’21