Post

Replies

Boosts

Views

Activity

Reply to SwiftUI iOS 14 MapKit Annotation Tap Gesture (didSelect)
Interesting thread. I'm getting the impression that there are a lot of hurdles refactoring existing maps to native Swift UI Map. I need for example Clustering. With UIViewRepresentable approach I could do something like: let annotationView = MKMarkerAnnotationView(annotation: annotation, reuseIdentifier: "Fountain") annotationView.clusteringIdentifier = "FountainCluster" Was anyone successful clustering MapPin, MapMarker or MapAnnotation - and defining interactions for the cluster (e.g. tap to expand/zoom in)?
Apr ’21
Reply to SwiftUI Map() delegate access.
Listing to the Region will give you the following error: Instance method 'onChange(of:perform:)' requires that 'MKCoordinateRegion' conform to 'Equatable' To avoid this you could keep track of just one of the values of the region: .onChange(of: region.center.latitude){ newLatitude in ... }
Apr ’21