I am trying to get an address based on the long/lat. it appears that something like this should work?
Geocoder myLocation = Geocoder(Locale.getDefault()); List myList = myLocation.getFromLocation(latPoint,lngPoint,1);
The issue is that I keep getting : The method Geocoder(Locale) is undefined for the type savemaplocation
Any assistance would be helpful. Thank you.
Thanks, I tried the context, locale one first, and that failed and was looking at some of the other constructors (I had seen one that had mentioned just locale). Regardless,
It did not work, as I am still getting : The method Geocoder(Context, Locale) is undefined for the type savemaplocation
I do have : import android.location.Geocoder;
The Geocoder use is totally free.
A class for handling geocoding and reverse geocoding. Geocoding is the process of transforming a street address or other description of a location into a (latitude, longitude) coordinate.
Yes, the Geoapify Reverse Geocoding Tool is Free! You can upload and process multiple locations. No coding and registration required. You can also use Geoapify Reverse Geocoding API and process up to 3000 addresses per day for FREE.
The following code snippet is doing it for me (lat and lng are doubles declared above this bit):
Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address> addresses = geocoder.getFromLocation(lat, lng, 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With