16 questions
0
votes
1
answer
37
views
Why does Map Annotation deselection does not work when tapping on empty map are while selected Annotation not visible?
I'm displaying Annotations on a SwiftUI.Map view and I'm seeing a strange behaviour that I'm not able to remedy.
When I tap on an Annotation, it get's selected and selectionId is se to whatever UUID ...
0
votes
0
answers
89
views
(iOS 18+ MapKit) Custom UserAnnotation annotation view
I'm implementing a Map with user location customization in SwiftUI using iOS 17+ MapKit APIs. When using the selection parameter with Map, the default blue dot user location becomes tappable but shows ...
0
votes
0
answers
164
views
How does one animate an annotation on a SwiftUI Mapkit Map?
I'm attempting to animate an array of annotations on a SwiftUI MapKit Map and not getting the behavior I'm expecting. I see lots of examples on how to animate the map camera, etc, and even a few on ...
1
vote
0
answers
36
views
how to calculate longitude & latitude From a source longitude, Latitude, angle(degree) & distance(length)
How to calculate Destination:(longitude & latitude precisely)
From a source :(longitude, Latitude, angle (degree) & distance
(length - direct, not through navigation path via road, direct ...
0
votes
2
answers
54
views
Custom MKMapView not reacting to location changes
In SwiftUI I’m trying to create a custom MKMapView to allow to tap on the existing map annotations.
However I’m having a hard time making the map react to the updates from the location manager. I must ...
1
vote
1
answer
560
views
Specifying Z-index for Map Markers and Annotations
Using SwiftUI, MapKit and the Map() view in iOS 17, I'm adding markers and annotations to the map instance. However it seems regardless of what order they are added, they are rendered with random Z-...
1
vote
1
answer
2k
views
SwiftUI Map MapPolyline not showing
My intention is to display a SwiftUI.Map (doc) with a line (that would represent a route) using MapPolyline (see doc). Unfortunately, the line does not display on neither the simulator nor a physical ...
0
votes
1
answer
1k
views
How can I get user location with MapKit?
I write map app for iOS 17 with Xcode 15. And I have problem with detecting user location.
So, I add the parameters to info
And I create Map() with MapUserLocationButton()
var body: some View {
...
1
vote
2
answers
809
views
MapKit lesson in SwiftUI giving compiler errors
I'm following the "Creating and Combining View" lesson on SwiftUI. However when I tried to use the MapKit, my simulator doesn't work as it is supposed to work (which is show the pin at the ...
3
votes
1
answer
778
views
Get coordinates in the onLongPressGesture on the Map
My question is very similar to this one: Capture touchDown location of onLongPressGesture in swiftUI?
However, there's one significant peculiarity: I want to get the coordinates of the ....
1
vote
0
answers
808
views
Opacity of the button affects its "clickability"
I've run into a very strange issue. I have a SwiftUI app (iOS) where I have a full-screen ZStack: inside, as a "bottom layer", I have a full-screen Map, and on top I have a button (it is ...
2
votes
2
answers
220
views
Publishing changes from within MAP() view updates is not allowed, this will cause undefined behavior
I've seen similar questions on this but none that are up to date or work successfully, I've followed Apples Developer docs, various videos, and guides on how to do this but it still throws these ...
0
votes
1
answer
267
views
SwiftUI get what Object's annotation was clicked on map. Core Data
i have been trying to make so that when you press an annotation on the map that has been created by Core Data's object to show the LocationPreviewView(fish: fish). So how can i get the selected item ...
1
vote
1
answer
276
views
Did not get the Map Scroll End event in SwiftUI
We are using the Map functionality with annotations.
Functionality:- We have 2000 records in the array but we need to filter 150 records according to the region changed in the Map in SwiftUI. But ...
0
votes
0
answers
56
views
Unidentified publishing object in SwiftUI Map annotation
Setup:
My app uses a SwiftUI Map with annotations. The annotations should be instances of a Place class defined as:
final class Place: NSManagedObject, UpdateTimestampable, Identifiable {
@...
0
votes
1
answer
100
views
Why is SwiftUI Map modifying the state of its calling struct, if no frame is assigned?
Setup:
My app uses a SwiftUI Map, essentially as
struct MapViewSWUI: View {
@Binding private var show_map_modal: Bool
@State private var region: MKCoordinateRegion
//…
init(show_map_modal: ...