利用百度API(js),怎樣經過地址獲取經緯度

根據經緯度找到具體地址:
http://api.map.baidu.com/geocoder?location=緯度,經度&output=輸出格式類型&key=用戶密鑰
如:
http://api.map.baidu.com/geocoder?location=31.407452,121.490523&output=json&key=6eea93095ae93db2c77be9ac910ff311

根據具體地址找到經緯度:
http://api.map.baidu.com/geocoder?address=地址&output=輸出格式類型&key=用戶密鑰&city=城市名

如:
http://api.map.baidu.com/geocoder?address=牡丹江路營業廳&output=json&key=6eea93095ae93db2c77be9ac910ff311&city=上海市html

 

https://zhidao.baidu.com/question/497003122.htmljson

相關文章
相關標籤/搜索