Shivam Dhuria
04/24/2025, 10:24 PMMapKit
(for ios) in my iosMain
Repository
val request = MKLocalSearchRequest().apply {
naturalLanguageQuery = query
}
val search = MKLocalSearch(request)
However, It is unable to successfully get the fields properly, what the latest best way to fix this?
search.startWithCompletionHandler { response, error ->
// map Items is converted to a List Of Any type
// it can't decipher what mapItem.placemark? is
val results = response?.mapItems?.mapNotNull { mapItem ->
val coordinate = mapItem.placemark?.coordinate
}