How to get only City, State, Country from lat, long in android

前端 未结 6 1711
半阙折子戏
半阙折子戏 2021-02-18 19:25

I have the below code to convert lat, long to human readable address. Now iam getting full details including street name. How can i get only city, state, country? I don\'t want

6条回答
  •  礼貌的吻别
    2021-02-18 19:28

    Have a look at Address (javadoc) which is returned from the geocoder. This has separate methods like getLocality() to return the city org getCountry() to return the country name etc.

提交回复
热议问题