You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can anyone confirm that this library is no longer functioning -- perhaps Apple restricted usage of tileOverlays for this purpose.
I call the following in viewDidLoad
// LayoutManager is a custom library that I wrote, it successfully places the MapView onscreen
mapView = MKMapView(frame: LayoutManager.between(elementAbove: roundName, elementBelow: selectTeamButton, width: view.frame.width, topPadding: 2 * .MARGINAL_PADDING, bottomPadding: .PADDING))
mapView.delegate = self
mapView.showsUserLocation = true
mapView.setUserTrackingMode(.follow, animated: true)
view.addSubview(mapView)
restyleMap()
Where restyleMap contains
guard let overlayFileURLString = Bundle.main.path(forResource: "overlay", ofType: "json") else {
return
}
let overlayFileURL = URL(fileURLWithPath: overlayFileURLString)
debugPrint(overlayFileURL)
// After that, you can create the tile overlay using MapKitGoogleStyler
guard let tileOverlay = try? MapKitGoogleStyler.buildOverlay(with: overlayFileURL) else {
return
}
// And finally add it to your MKMapView
mapView.delegate = self
mapView.addOverlay(tileOverlay, level: .aboveLabels)
debugPrint(mapView.overlays)
I can confirm that the overlay is added to the map, but the dark style JSON doesn't load. I put a breakpoint inside the func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer function, but the function isn't getting called.
Any thoughts on why this might be happening? Is the renderer returned without the necessary attributes to make the map load it?
The text was updated successfully, but these errors were encountered:
Can anyone confirm that this library is no longer functioning -- perhaps Apple restricted usage of tileOverlays for this purpose.
I call the following in viewDidLoad
Where restyleMap contains
I can confirm that the overlay is added to the map, but the dark style JSON doesn't load. I put a breakpoint inside the
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer
function, but the function isn't getting called.Any thoughts on why this might be happening? Is the renderer returned without the necessary attributes to make the map load it?
The text was updated successfully, but these errors were encountered: