0

In short I want to fetch address from latitude longitude at offline mode. I've tried this geocoder package. but this is required internet to get address from latitude longitude

Tried so far
static getCurrentLocationAddress() async {
    try {
      List<Placemark> listPlaceMarks = await placemarkFromCoordinates(
          currentPosition.latitude, currentPosition.longitude);
      Placemark place = listPlaceMarks[0];
      currentLocationAddress =
          "${place.country}, ${place.locality}, ${place.administrativeArea}";
    } catch (e) {
      print(e);
    }
  }

I just want same think but without internet requirement.

Any answer and suggestions are most welcome. Thanks in advance.

Abdul Qadir
  • 492
  • 4
  • 13
  • https://pub.dev/packages/location this will help for you – Shubham Narkhede Aug 23 '21 at 10:01
  • shubham sir, this package isn't return address. Have a look on question I want address from latitude and longitude without accessing internet. – Abdul Qadir Aug 23 '21 at 11:53
  • 1
    Hi @abdul sorry to say but it is not possible to do it into offline you must required internet connection to do this task also have a look into this answer maybe this will work for you https://stackoverflow.com/questions/6159074/given-the-lat-long-coordinates-how-can-we-find-out-the-city-country/6355183#6355183 – Shubham Narkhede Aug 24 '21 at 04:22
  • I've already gone through this answer. thanks for suggestion – Abdul Qadir Aug 25 '21 at 06:52

1 Answers1

0

You can only get your address by location using this package using the internet. It's not possible to get an address without using the internet.

https://pub.dev/packages/geolocator