Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Geocoder getFromLocation failed

I'm trying to get placemarks from coordinates.

I'm using geoLocator for that. It was working fine today morning, but now, it throws platform exception.

PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: <lat>, longitude: <long>)., null)

It says it's a network error, but my device is connected to the internet,

First, i thought there might be some problem in the Geolocator package, so i used Geocoding package, but the problem persists.

This is the error from geocoder.

Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@e8c2197, ex = grpc failed, return results = []

Please help.

like image 595
Madhavam Shahi Avatar asked Aug 24 '26 16:08

Madhavam Shahi


1 Answers

try to add localeIdentifier parameter. works for me. my function code will be like

List<Placemark> newPlace = await GeocodingPlatform.instance.placemarkFromCoordinates(position.latitude, position.longitude,localeIdentifier: "en");
like image 158
Surya permana Avatar answered Aug 26 '26 06:08

Surya permana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!