Hi Guys, I am trying to query Locations using `Map...
# multiplatform
s
Hi Guys, I am trying to query Locations using
MapKit
(for ios) in my
iosMain
Repository
Copy code
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?
Copy code
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
}