Post

Replies

Boosts

Views

Activity

SwiftUI Map + Marker + AsyncImage Support
I would like to be able to use AsyncImage inside of a SwiftUI Map Marker like this: Map(position: $cameraPosition) { Marker(coordinate: coord) { AsyncImage(url: url) } } But when I try to do this I get one of two outcomes. The first outcome I've seen is a crash like this: Thread 1: EXC_BAD_ACCESS (code=1, address=0x20) The second possible outcome I've seen is that the image doesn't load but just has a blank placeholder like this: I also tried creating a custom View that takes the url, downloads the data asynchronously, converts the data to a UIImage, sets the UIImage to a @State variable and then uses the Image(uiimage:) SwiftUI view but I got the same results. Has anyone else gotten something like this working?
2
0
310
Aug ’24
MKLocalSearch missing Music Venues from response
I have created an MKLocalSearch request as follows: let reqVenue = MKLocalSearch.Request() reqVenue.naturalLanguageQuery = "Music Venue" reqVenue.resultTypes = .pointOfInterest reqVenue.region = .init(center: mockCoord, latitudinalMeters: 150, longitudinalMeters: 150) I have made sure mockCoord is the exact location coordinate of the example music venue I want to get back in the response. I have noticed that all Music Venues I can find on Apple Maps do not come back as results in MKLocalSearch. I would love an explanation as to why and what I can do to make them appear in MKLocalSearch results please! best, nick
2
0
503
Jun ’24