Convert latitude and longitude to geographic location

    The project has a requirement, which is to convert latitude and longitude into a specific geographic location. I began to prepare to use the jar method of Baidu Maps, but this method has a flaw, which will bring a great increase to the app. So the research gave up this method.

    Therefore, the second method is adopted, which is converted through the API provided by Baidu Maps. The Api address is as follows

   http://api.map.baidu.com/geocoder/v2/?ak=Your applied key&callback=renderReverse&location=39.983424,116.32298

7&output=json

    In the above api, ak is the key you applied for on Baidu Maps. Note that the application category of the application is server side

    location is latitude and longitude spliced ​​by ","

    output is the returned data type, the default is xml

    OK this is the end. . .



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324701500&siteId=291194637