I'm trying to create an app where the user guesses their location, so I'd love to hide the road name and country in the MKLookAroundView. I have already seen some apps pull this off and I'm wondering how to do it. I tried this, but it's not working:
struct LookAroundView: UIViewControllerRepresentable {
@Binding var isExpanded: Bool
@Binding var initialScene: MKLookAroundScene?
func makeUIViewController(context: Context) -> MKLookAroundViewController {
let lookAroundViewController = MKLookAroundViewController()
lookAroundViewController.isNavigationEnabled = true
lookAroundViewController.showsRoadLabels = false // I thought this would hide road labels but it doesn't
lookAroundViewController.pointOfInterestFilter = .excludingAll
lookAroundViewController.badgePosition = .bottomTrailing
if let initialScene = initialScene {
lookAroundViewController.scene = initialScene
}
return lookAroundViewController
}
func updateUIViewController(_ uiViewController: MKLookAroundViewController, context: Context) {
uiViewController.isNavigationEnabled = isExpanded
uiViewController.showsRoadLabels = false //This was my last idea
}
}