How can I get city name from a latitude and longitude point?

后端 未结 11 1203
感情败类
感情败类 2020-11-28 03:07

Is there a way to get a city name from a latitude and longitude point using the google maps api for javascript?

If so could I please see an example?

11条回答
  •  粉色の甜心
    2020-11-28 03:24

    There are many tools available

    1. google maps API as like all had written
    2. use this data "https://simplemaps.com/data/world-cities" download free version and convert excel to JSON with some online converter like "http://beautifytools.com/excel-to-json-converter.php"
    3. use IP address which is not good because using IP address of someone may not good users think that you can hack them.

    other free and paid tools are available also

提交回复
热议问题