How to get complete address from latitude and longitude?

前端 未结 21 2162
深忆病人
深忆病人 2020-11-22 09:07

I want to get following values from Latitude and Longitude in android

  1. Street Address
  2. City / State
  3. Zip
  4. Complete Address
<
21条回答
  •  -上瘾入骨i
    2020-11-22 09:39

    You are looking for the term Geocoding.

    The short story is you need to do:

    Geocoder geocoder = new Geocoder(this, Locale.getDefault());
    List
    addresses = geocoder.getFromLocation(lat, lng, 1);

    To do more you should read up on the Geocoder here.

提交回复
热议问题