What's new in MapKit

RSS for tag

Discuss the WWDC22 Session What's new in MapKit

Posts under wwdc2022-10035 tag

10 Posts

Post

Replies

Boosts

Views

Activity

MapKit Custom 3D Models
Dear Apple Team and everyone who has experience with MapKit. I am building an app where I need to hide some 3D models and replace them with my custom 3D meshes using SceneKit. Up until now I was using Mapbox it allows to get mesh row data to reconstruct all maps 3D. Is there something like this possible with MapKit? Use cases Say you navigated to Kennedy Space Center Launch Complex 39 and there is no 3D model of actual building. I would like to be able to hide simple massing and replace it with my model. In 3D Satellite VIew some areas have detailed meshes. Say London The Queen's Walk. I would like to make specific area flat so I can place my 3D model on top of Satellite 3D View to illustrate new structure or building. Last one. Is it possible to change existing buildings colours? I know it is possible transparency Thank you @apple
2
1
2.6k
Oct ’23
MapKit - Look Around - isNavigationEnabled not working?
I'm adding Look Around into my app, but settings isNavigationEnabled to true or false does nothing. This bool is set to true by default, and my understanding is that it will enable the user to navigate around the location. I tried setting it to false and that didn't change the experience as the user was able to rotate the camera 360 degrees, but not move around freely in the area. Is this by design or am I missing something? Note: I'm on the latest Xcode 14 beta (beta 6). Here is my basic implementation: let lookAroundRequest = MKLookAroundSceneRequest(coordinate: location.coordinate!) lookAroundRequest.getSceneWithCompletionHandler { lookAroundScene, error in guard error == nil, lookAroundScene != nil else { return } let lookAroundVC = MKLookAroundViewController(scene: lookAroundScene!) lookAroundVC.pointOfInterestFilter = .includingAll self.present(lookAroundVC) }
3
0
2k
Aug ’23
Mapkit: [Pipeline Library] Mapping the Pipeline data cache failed, errno22
Hi, when I add mapview to my viewcontroller i receive the log [Pipeline Library] Mapping the pipeline data cache failed, errno22. This happened after i had updated xcode to 14.3 and the log is only shown when i test on a real device and not when i test on the simulator. (This is shown always in every project i create, even without calling any function to modify the mapview. I only add the MapKit and Core Location libraries.) Xcode version: Version 14.3 (14E222b) Iphone: Iphone 8, IOS version: 16.4 I've tested also on Iphone 12 with lower IOS version and i receive the same error.
2
1
2.1k
Jul ’23
Will there be more MapKit features in SwiftUI space?
Hi Apple MapKit team, I am a new iOS developer and recently learned SwiftUI. This WWDC is my first one. I noticed that although Apple is moving towards SwiftUI, the new features released for MapKit is still largely UIKit based. I am not very familiar with UIKit. I wondered that if MapKit team is going to mainly develop in MapKit space instead of the SwiftUI space. Cheers,
1
0
1.4k
Feb ’23
SwiftUI MapAnnotation Publishing changes warnings
Hello, I am facing SwiftUI runtime warnings while implementing MapAnnotation [SwiftUI] Publishing changes from within view updates is not allowed, this will cause undefined behavior., there are new warnings when the map is moved. Implementing MapMarker instead of MapAnnotation solves the problem. What am I doing wrong with MapAnnotation? The code is running on Xcode version 14.1 (14B47b) and Simulator Version 14.1 (986.5) struct AnnotationItem: Identifiable {     let id = UUID()     var coordinate: CLLocationCoordinate2D } struct MapView: View {     @Binding var region: MKCoordinateRegion     @Binding var items: [AnnotationItem]     var body: some View {         Map(coordinateRegion: $region, annotationItems: items) { item in             MapAnnotation(coordinate: item.coordinate) {                 Image(systemName: "cup.and.saucer.fill")             }         }     } }
1
2
2.1k
Nov ’22
MKLookAround broken on split screen and stage manager
I just want to see if anyone has worked around the following issue. I did file feedback at FB11405641. Using Apple's demo app from WWDC, if I open the LookAround when on an iPad in either split screen or using Stage Manager the full screen representation is not respecting the actual size of the window. See Here are some videos showing the issue: https://www.hotngui.com/tmp/SplitScreen.mov https://www.hotngui.com/tmp/StageManager.mov
1
0
1.3k
Sep ’22
MapKit Look Around API
I'm messing about with the new Look Around APIs in iOS 16, and can't seem to find a way to do a few things: Hide the current location label that shows up at the bottom of the Look Around view Go straight into the Look Around view rather than having to tap into it with the button Overlay a view on top of the Look Around view when panning/movement is active (the view seems to take highest priority and I cannot override it) Get it running on MacOS (as an iPad app) struct LookAroundView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> some UIViewController { let viewController = MKLookAroundViewController() viewController.badgePosition = .topLeading viewController.isNavigationEnabled = true viewController.pointOfInterestFilter = .excludingAll viewController.showsRoadLabels = false viewController.title = "Round 1" let location = CLLocationCoordinate2D( latitude: 37.80770, longitude: -122.47207 ) let sceneRequest = MKLookAroundSceneRequest(coordinate: location) Task { do { viewController.scene = try await sceneRequest.scene } catch { viewController.scene = nil } } return viewController } func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { } }
1
1
1.7k
Aug ’22
When 500m is specified in MKCoordinateRegion, it stops with an error.
I used Xcode 14 Beta 2. It worked fine on Xcode 13. If you set it to 3000m as shown below, it will work without problems. Below is the sample code. import SwiftUI import MapKit enum MapType {   case standard   case satellite   case hybrid   case satelliteFlyover   case hybridFlyover   case mutedStandard } struct MapView: UIViewRepresentable {   let searchKey: String       let mapType: MapType   func makeUIView(context: Context) -> MKMapView {     return MKMapView()   }       func updateUIView(_ uiView: MKMapView, context: Context) {     switch mapType {     case .standard:       uiView.preferredConfiguration = MKStandardMapConfiguration(elevationStyle: .flat)             case .satellite:       uiView.preferredConfiguration = MKImageryMapConfiguration()     case .hybrid:       uiView.preferredConfiguration = MKHybridMapConfiguration()     case .satelliteFlyover:       uiView.preferredConfiguration = MKImageryMapConfiguration(elevationStyle: .realistic)     case .hybridFlyover:       uiView.preferredConfiguration = MKHybridMapConfiguration(elevationStyle: .realistic)     case .mutedStandard:       uiView.preferredConfiguration = MKStandardMapConfiguration(emphasisStyle: .muted)     }     let geocoder = CLGeocoder()           geocoder.geocodeAddressString(searchKey) { placemarks, error in       if let placemarks,         let firstPlaceMark = placemarks.first ,         let location = firstPlaceMark.location {                   let targetCoordinate = location.coordinate                   print(targetCoordinate)                   let pin = MKPointAnnotation()                   pin.coordinate = targetCoordinate                   pin.title = searchKey         uiView.addAnnotation(pin)         uiView.region = MKCoordinateRegion(center: targetCoordinate,                           latitudinalMeters: 3000.0,                           longitudinalMeters: 3000.0)       }     }   } }
3
0
2.2k
Jul ’22
MapKit Custom 3D Models
Dear Apple Team and everyone who has experience with MapKit. I am building an app where I need to hide some 3D models and replace them with my custom 3D meshes using SceneKit. Up until now I was using Mapbox it allows to get mesh row data to reconstruct all maps 3D. Is there something like this possible with MapKit? Use cases Say you navigated to Kennedy Space Center Launch Complex 39 and there is no 3D model of actual building. I would like to be able to hide simple massing and replace it with my model. In 3D Satellite VIew some areas have detailed meshes. Say London The Queen's Walk. I would like to make specific area flat so I can place my 3D model on top of Satellite 3D View to illustrate new structure or building. Last one. Is it possible to change existing buildings colours? I know it is possible transparency Thank you @apple
Replies
2
Boosts
1
Views
2.6k
Activity
Oct ’23
MapKit - Look Around - isNavigationEnabled not working?
I'm adding Look Around into my app, but settings isNavigationEnabled to true or false does nothing. This bool is set to true by default, and my understanding is that it will enable the user to navigate around the location. I tried setting it to false and that didn't change the experience as the user was able to rotate the camera 360 degrees, but not move around freely in the area. Is this by design or am I missing something? Note: I'm on the latest Xcode 14 beta (beta 6). Here is my basic implementation: let lookAroundRequest = MKLookAroundSceneRequest(coordinate: location.coordinate!) lookAroundRequest.getSceneWithCompletionHandler { lookAroundScene, error in guard error == nil, lookAroundScene != nil else { return } let lookAroundVC = MKLookAroundViewController(scene: lookAroundScene!) lookAroundVC.pointOfInterestFilter = .includingAll self.present(lookAroundVC) }
Replies
3
Boosts
0
Views
2k
Activity
Aug ’23
Mapkit: [Pipeline Library] Mapping the Pipeline data cache failed, errno22
Hi, when I add mapview to my viewcontroller i receive the log [Pipeline Library] Mapping the pipeline data cache failed, errno22. This happened after i had updated xcode to 14.3 and the log is only shown when i test on a real device and not when i test on the simulator. (This is shown always in every project i create, even without calling any function to modify the mapview. I only add the MapKit and Core Location libraries.) Xcode version: Version 14.3 (14E222b) Iphone: Iphone 8, IOS version: 16.4 I've tested also on Iphone 12 with lower IOS version and i receive the same error.
Replies
2
Boosts
1
Views
2.1k
Activity
Jul ’23
mkmapview blend modes
So where is the example code of what was presented wrt mapview blend modes? I have NO clue how to apply a blend mode.
Replies
2
Boosts
0
Views
1.4k
Activity
Feb ’23
Will there be more MapKit features in SwiftUI space?
Hi Apple MapKit team, I am a new iOS developer and recently learned SwiftUI. This WWDC is my first one. I noticed that although Apple is moving towards SwiftUI, the new features released for MapKit is still largely UIKit based. I am not very familiar with UIKit. I wondered that if MapKit team is going to mainly develop in MapKit space instead of the SwiftUI space. Cheers,
Replies
1
Boosts
0
Views
1.4k
Activity
Feb ’23
SwiftUI MapAnnotation Publishing changes warnings
Hello, I am facing SwiftUI runtime warnings while implementing MapAnnotation [SwiftUI] Publishing changes from within view updates is not allowed, this will cause undefined behavior., there are new warnings when the map is moved. Implementing MapMarker instead of MapAnnotation solves the problem. What am I doing wrong with MapAnnotation? The code is running on Xcode version 14.1 (14B47b) and Simulator Version 14.1 (986.5) struct AnnotationItem: Identifiable {     let id = UUID()     var coordinate: CLLocationCoordinate2D } struct MapView: View {     @Binding var region: MKCoordinateRegion     @Binding var items: [AnnotationItem]     var body: some View {         Map(coordinateRegion: $region, annotationItems: items) { item in             MapAnnotation(coordinate: item.coordinate) {                 Image(systemName: "cup.and.saucer.fill")             }         }     } }
Replies
1
Boosts
2
Views
2.1k
Activity
Nov ’22
MKLookAround broken on split screen and stage manager
I just want to see if anyone has worked around the following issue. I did file feedback at FB11405641. Using Apple's demo app from WWDC, if I open the LookAround when on an iPad in either split screen or using Stage Manager the full screen representation is not respecting the actual size of the window. See Here are some videos showing the issue: https://www.hotngui.com/tmp/SplitScreen.mov https://www.hotngui.com/tmp/StageManager.mov
Replies
1
Boosts
0
Views
1.3k
Activity
Sep ’22
MapKit Look Around API
I'm messing about with the new Look Around APIs in iOS 16, and can't seem to find a way to do a few things: Hide the current location label that shows up at the bottom of the Look Around view Go straight into the Look Around view rather than having to tap into it with the button Overlay a view on top of the Look Around view when panning/movement is active (the view seems to take highest priority and I cannot override it) Get it running on MacOS (as an iPad app) struct LookAroundView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> some UIViewController { let viewController = MKLookAroundViewController() viewController.badgePosition = .topLeading viewController.isNavigationEnabled = true viewController.pointOfInterestFilter = .excludingAll viewController.showsRoadLabels = false viewController.title = "Round 1" let location = CLLocationCoordinate2D( latitude: 37.80770, longitude: -122.47207 ) let sceneRequest = MKLookAroundSceneRequest(coordinate: location) Task { do { viewController.scene = try await sceneRequest.scene } catch { viewController.scene = nil } } return viewController } func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { } }
Replies
1
Boosts
1
Views
1.7k
Activity
Aug ’22
Fully Texturized 3D Map
Does MapKit have an option for the fully texturized city view where available (i.e. NYC) as seen in the Maps app for iOS (see image)?
Replies
1
Boosts
0
Views
1.3k
Activity
Aug ’22
When 500m is specified in MKCoordinateRegion, it stops with an error.
I used Xcode 14 Beta 2. It worked fine on Xcode 13. If you set it to 3000m as shown below, it will work without problems. Below is the sample code. import SwiftUI import MapKit enum MapType {   case standard   case satellite   case hybrid   case satelliteFlyover   case hybridFlyover   case mutedStandard } struct MapView: UIViewRepresentable {   let searchKey: String       let mapType: MapType   func makeUIView(context: Context) -> MKMapView {     return MKMapView()   }       func updateUIView(_ uiView: MKMapView, context: Context) {     switch mapType {     case .standard:       uiView.preferredConfiguration = MKStandardMapConfiguration(elevationStyle: .flat)             case .satellite:       uiView.preferredConfiguration = MKImageryMapConfiguration()     case .hybrid:       uiView.preferredConfiguration = MKHybridMapConfiguration()     case .satelliteFlyover:       uiView.preferredConfiguration = MKImageryMapConfiguration(elevationStyle: .realistic)     case .hybridFlyover:       uiView.preferredConfiguration = MKHybridMapConfiguration(elevationStyle: .realistic)     case .mutedStandard:       uiView.preferredConfiguration = MKStandardMapConfiguration(emphasisStyle: .muted)     }     let geocoder = CLGeocoder()           geocoder.geocodeAddressString(searchKey) { placemarks, error in       if let placemarks,         let firstPlaceMark = placemarks.first ,         let location = firstPlaceMark.location {                   let targetCoordinate = location.coordinate                   print(targetCoordinate)                   let pin = MKPointAnnotation()                   pin.coordinate = targetCoordinate                   pin.title = searchKey         uiView.addAnnotation(pin)         uiView.region = MKCoordinateRegion(center: targetCoordinate,                           latitudinalMeters: 3000.0,                           longitudinalMeters: 3000.0)       }     }   } }
Replies
3
Boosts
0
Views
2.2k
Activity
Jul ’22