In my iOS app I want to let user to pick an address with a long press gesture on a GMSMapView
. So I implemented the mapView:_ didLongPressAtCoordinate:_
method to take the coordinate he choose and to make reverseGeocoding and get the address:
let geocoder = GMSGeocoder()
geocoder.reverseGeocodeCoordinate(coordinate) { response, error in
if let address = response?.firstResult() {
// Everything ok
} else {
// Here the response is 'nil'
}
}
What can I can do here, when the response is nil
to get the nearest location coordinate with a human readable address?
error
var is nil. Simply,response
is nil too. – Francesco Frascà Apr 03 '16 at 20:03