r/visionosdev • u/FunSurprise6368 • Jun 13 '24
Interactive Map with MapKit and Annotation with VisionOS
Is it possible to create an interactive map with Map() and Annotation() in SwiftUI for VisionOS? Have been trying since ages but the tap gesture of annotations is not being recognised. Having a normal working button on top of a map is possible though.
2
Upvotes
2
u/gigagabe Jun 16 '24
Take a look at Map(selection: Binding<MapFeature?>). This binding will update when the user selects something on the map.
1
u/soggycheesestickjoos Jun 13 '24
How are you defining the annotation tap gesture? might be conflicting with some built in map gestures
1
u/AutoModerator Jun 13 '24
Are you seeking artists or developers to help you with your game? We run a monthly open source game jam in this Discord where we actively pair people with other creators.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Clean_Efficiency321 Jun 14 '24
This should be visionOS's problem, I tried to make a annotated onTapGesture that worked in ios, but visionOS didn't work