Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
1 answer
76 views

How to fix map annotation selection issues in iOS 17?

I'm working on MapKit for SwiftUI using iOS 17, where I have a custom annotation. When an annotation is selected, a DetailsView should be shown, but it does not work as expected. Selecting an ...
Roland Lariotte's user avatar
0 votes
1 answer
142 views

How to Add a New Marker by Tapping on a Map in SwiftUI iOS 17?

I am trying to achieve a similar functionality to Google Maps. When my user clicks on an existing marker, a sheet pops up showing them a page with the details of the marker. However, if they click on ...
devOP1's user avatar
  • 327
0 votes
0 answers
53 views

Why SwiftUI Map Annotation is not updating its title immediately with the selected place name?

The issue I'm encountering with the 'identifiableMapItem.mapItem.name' displaying “Unknown Location” initially and then updating only after another annotation is added. It seems to be related to the ...
Emre Değirmenci's user avatar
0 votes
0 answers
163 views

iOS 17 Map Initial Zoom Level

I’m working on a SwiftUI app that displays a map with multiple markers and polylines between them. I want the map to start zoomed out to show a 500 km high/over of the starting point. However, the map ...
Emre Değirmenci's user avatar
0 votes
1 answer
494 views

How to animate the new annotation in iOS 17 in MapKit based on a change in location?

In MK this was strait forward, but I can't seem to find anything that works with the new MapKit. Requirement: When location changes, animate smoothly the annotation from oldValue to newValue. So I ...
Euqebrab's user avatar
-2 votes
1 answer
83 views

Swift: Failed to produce diagnostic for expression; please submit a bug report

Hello, im having trouble with XCode 15. This is my full code of this part: struct ExploreView: View { @State private var cameraPosition: MapCameraPosition = .region(.userRegion) @State private ...
sbd's user avatar
  • 1
2 votes
1 answer
1k views

'MapAnnotation' was deprecated in iOS 17.0: Use Annotation along with Map initializers that take a MapContentBuilder instead

I have an understanding problem migrating to the new iOS17 MapKit in SwiftUI. I have this code in my app: NavigationStack { Map(coordinateRegion: $mapRegion, annotationItems: destinations) { ...
Torsten's user avatar
  • 25
0 votes
1 answer
675 views

iOS 17 MapKit SwiftUI - Zoom out when the button selected

I'm trying to mimic same behaviour of the Apple Maps app search button tapped zoom out functionality but I'm not able to do it. In the Apple Maps app, after searching a place and tapping on the search ...
Emre Değirmenci's user avatar
4 votes
2 answers
4k views

Map(coordinateRegion: , showsUserLocation: ) deprecated in iOS 17.0

Any ideas of how to replace this call? It was blindingly useful and has now been deprecated in iOS 17.0. Map(coordinateRegion: $viewModel.region, showsUserLocation: true) This was being fed via: enum ...
Edward Hasted's user avatar
0 votes
1 answer
206 views

MapCircle not updating on center or radius change

Related to MapCircle not updating on center or radius change. Using Xcode 15.0 beta 4 I have MapCoordinate struct: private struct MapCoordinate: Equatable { let location: Location let ...
ItayAmza's user avatar
  • 929