赞
踩
最近要做地图相关业务,调研了 四大地图api的 逆地址解析接口,如下
1.谷歌文档地址
https://developers.google.com/maps/documentation/geocoding/start?hl=zh_CN
{ "plus_code" : { "compound_code" : "6867+JJ 中国上海市闵行区", "global_code" : "8Q336867+JJ" }, "results" : [ { "address_components" : [ { "long_name" : "闵行区", "short_name" : "闵行区", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市闵行区北翟路3889号9座", "geometry" : { "location" : { "lat" : 31.211548, "lng" : 121.314126 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 31.2128969802915, "lng" : 121.3154749802915 }, "southwest" : { "lat" : 31.2101990197085, "lng" : 121.3127770197085 } } }, "place_id" : "ChIJ6zlNLf9msjURVozjuyLSH0A", "plus_code" : { "compound_code" : "6867+JM 中国上海市闵行区", "global_code" : "8Q336867+JM" }, "types" : [ "establishment", "point_of_interest" ] }, { "address_components" : [ { "long_name" : "中骏广场", "short_name" : "中骏广场", "types" : [ "premise" ] }, { "long_name" : "闵行区", "short_name" : "闵行区", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市闵行区中骏广场", "geometry" : { "bounds" : { "northeast" : { "lat" : 31.2116502, "lng" : 121.3153167 }, "southwest" : { "lat" : 31.2113504, "lng" : 121.3148609 } }, "location" : { "lat" : 31.2114602, "lng" : 121.3150675 }, "location_type" : "ROOFTOP", "viewport" : { "northeast" : { "lat" : 31.2128492802915, "lng" : 121.3164377802915 }, "southwest" : { "lat" : 31.2101513197085, "lng" : 121.3137398197085 } } }, "place_id" : "ChIJNcpYxPhmsjUR20wLdpnvO10", "types" : [ "premise" ] }, { "address_components" : [ { "long_name" : "迁虹路", "short_name" : "迁虹路", "types" : [ "route" ] }, { "long_name" : "闵行区", "short_name" : "闵行区", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市闵行区迁虹路", "geometry" : { "bounds" : { "northeast" : { "lat" : 31.2118856, "lng" : 121.3157479 }, "southwest" : { "lat" : 31.2114037, "lng" : 121.3125755 } }, "location" : { "lat" : 31.2116366, "lng" : 121.3141634 }, "location_type" : "GEOMETRIC_CENTER", "viewport" : { "northeast" : { "lat" : 31.2129936302915, "lng" : 121.3157479 }, "southwest" : { "lat" : 31.2102956697085, "lng" : 121.3125755 } } }, "place_id" : "ChIJE3RPzfhmsjUR1Ir05s50Pvw", "types" : [ "route" ] }, { "address_components" : [ { "long_name" : "闵行区", "short_name" : "闵行区", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市闵行区", "geometry" : { "bounds" : { "northeast" : { "lat" : 31.2596274, "lng" : 121.5754454 }, "southwest" : { "lat" : 30.9759089, "lng" : 121.2399329 } }, "location" : { "lat" : 31.112818, "lng" : 121.381716 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 31.2596274, "lng" : 121.5754454 }, "southwest" : { "lat" : 30.9759089, "lng" : 121.2399329 } } }, "place_id" : "ChIJ1YdL4jtjsjURKIi-FisQXt4", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "address_components" : [ { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "locality", "political" ] }, { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市", "geometry" : { "bounds" : { "northeast" : { "lat" : 31.8727163, "lng" : 122.2471487 }, "southwest" : { "lat" : 30.6755933, "lng" : 120.8568044 } }, "location" : { "lat" : 31.230416, "lng" : 121.473701 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 31.8727163, "lng" : 122.2471487 }, "southwest" : { "lat" : 30.6755933, "lng" : 120.8568044 } } }, "place_id" : "ChIJMzz1sUBwsjURoWTDI5QSlQI", "types" : [ "locality", "political" ] }, { "address_components" : [ { "long_name" : "上海市", "short_name" : "上海市", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国上海市", "geometry" : { "bounds" : { "northeast" : { "lat" : 31.8727163, "lng" : 122.2471487 }, "southwest" : { "lat" : 30.6755933, "lng" : 120.8568044 } }, "location" : { "lat" : 31.2191829, "lng" : 121.4456179 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 31.8727163, "lng" : 122.2471487 }, "southwest" : { "lat" : 30.6755933, "lng" : 120.8568044 } } }, "place_id" : "ChIJBftfxTICsjUR_z-KXanY9fI", "types" : [ "administrative_area_level_1", "political" ] }, { "address_components" : [ { "long_name" : "中国", "short_name" : "CN", "types" : [ "country", "political" ] } ], "formatted_address" : "中国", "geometry" : { "bounds" : { "northeast" : { "lat" : 53.5609739, "lng" : 134.7754563 }, "southwest" : { "lat" : 17.9996, "lng" : 73.4994136 } }, "location" : { "lat" : 35.86166, "lng" : 104.195397 }, "location_type" : "APPROXIMATE", "viewport" : { "northeast" : { "lat" : 53.5609739, "lng" : 134.7754563 }, "southwest" : { "lat" : 17.9996, "lng" : 73.4994136 } } }, "place_id" : "ChIJwULG5WSOUDERbzafNHyqHZU", "types" : [ "country", "political" ] } ], "status" : "OK" }
2.百度文档
http://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding-abroad
{"status":0,"result":{"location":{"lng":121.32499617417317,"lat":31.215995756252434},"formatted_address":"上海市闵行区申贵路","business":"虹桥,华漕","addressComponent":{"country":"中国","country_code":0,"country_code_iso":"CHN","country_code_iso2":"CN","province":"上海市","city":"上海市","city_level":2,"district":"闵行区","town":"","town_code":"","adcode":"310112","street":"申贵路","street_number":"","direction":"","distance":""},"pois":[],"roads":[],"poiRegions":[],"sematic_description":"","cityCode":289}}
3.腾讯文档
https://lbs.qq.com/webservice_v1/guide-gcoder.html
https://apis.map.qq.com/ws/geocoder/v1/?location=31.2115888300,121.3140654500&get_poi=1&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77 |
接口地址(腾讯接口 需要企业级别才免费,暂时使用测试用例key) |
{ "status":0, "message":"query ok", "request_id":"8da7f7dc-2b98-11ea-a23d-5254004df5fd", "result":{ "location":{ "lat":31.211589, "lng":121.314065 }, "address":"上海市闵行区迁虹路", "formatted_addresses":{ "recommend":"闵行区中骏广场(迁虹路)", "rough":"闵行区中骏广场(迁虹路)" }, "address_component":{ "nation":"中国", "province":"上海市", "city":"上海市", "district":"闵行区", "street":"迁虹路", "street_number":"迁虹路" }, "ad_info":{ "nation_code":"156", "adcode":"310112", "city_code":"156310000", "name":"中国,上海市,上海市,闵行区", "location":{ "lat":30.982771, "lng":121.375 }, "nation":"中国", "province":"上海市", "city":"上海市", "district":"闵行区" }, "address_reference":{ "street_number":{ "id":"", "title":"", "location":{ "lat":31.211981, "lng":121.316513 }, "_distance":3.7, "_dir_desc":"" }, "crossroad":{ "id":"5308415", "title":"申长路/迁虹路(路口)", "location":{ "lat":31.21151, "lng":121.312576 }, "_distance":136.4, "_dir_desc":"东" }, "town":{ "id":"310112008", "title":"新虹街道", "location":{ "lat":31.219749, "lng":121.342621 }, "_distance":0, "_dir_desc":"内" }, "street":{ "id":"2380005679361647420", "title":"迁虹路", "location":{ "lat":31.211981, "lng":121.316513 }, "_distance":3.7, "_dir_desc":"" }, "landmark_l2":{ "id":"16671592632518541507", "title":"中骏广场", "location":{ "lat":31.212549, "lng":121.315399 }, "_distance":0, "_dir_desc":"内" } }, "poi_count":10, "pois":[{ "id":"16671592632518541507", "title":"中骏广场", "address":"上海市闵行区申长路1588弄26号", "category":"房产小区:商务楼宇", "location":{ "lat":31.212549, "lng":121.315399 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":0, "_dir_desc":"内" }, { "id":"13181335575524268676", "title":"上海虹桥商务区", "address":"上海市闵行区申虹路33号", "category":"房产小区:产业园区", "location":{ "lat":31.191429, "lng":121.316406 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":0, "_dir_desc":"内" }, { "id":"10355837137516220135", "title":"恒基·旭辉中心北区", "address":"上海市闵行区新虹街道申虹路恒基·旭辉中心北区", "category":"房产小区:住宅区:住宅小区", "location":{ "lat":31.213118, "lng":121.316925 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":174.9, "_dir_desc":"西南" }, { "id":"1250427217363391736", "title":"RNG上海总部", "address":"上海市闵行区中骏广场1期19栋", "category":"公司企业:公司企业", "location":{ "lat":31.210991, "lng":121.313965 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":67.1, "_dir_desc":"北" }, { "id":"18063563724425824764", "title":"瑾萱花屋(爱博店)", "address":"上海市闵行区申虹路1588号中骏广场1楼", "category":"购物:花鸟鱼虫", "location":{ "lat":31.211702, "lng":121.314186 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":17.2, "_dir_desc":"" }, { "id":"5024435629086027688", "title":"中骏置业控股有限公司", "address":"上海市闵行区申长路1588弄26号中骏广场", "category":"公司企业:公司企业", "location":{ "lat":31.211531, "lng":121.31501 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":90.3, "_dir_desc":"西" }, { "id":"17270193417937410407", "title":"九牧王分公司", "address":"上海市闵行区商务区中骏广场26号201室", "category":"公司企业:公司企业", "location":{ "lat":31.211519, "lng":121.315033 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":92.6, "_dir_desc":"西" }, { "id":"16781358361252454477", "title":"沙县小吃上海第077店", "address":"上海市闵行区迁虹路", "category":"美食:小吃快餐", "location":{ "lat":31.211241, "lng":121.313133 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":96.7, "_dir_desc":"东北" }, { "id":"4262223489007526751", "title":"上海唯品会小额贷款有限公司", "address":"上海市闵行区申长路1588弄中骏广场6号楼", "category":"公司企业:公司企业", "location":{ "lat":31.209869, "lng":121.314056 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":191.3, "_dir_desc":"北" }, { "id":"2577013362940237338", "title":"恒基·旭辉中心", "address":"上海市闵行区申贵路1799弄", "category":"房产小区:住宅区:住宅小区", "location":{ "lat":31.21114, "lng":121.31765 }, "ad_info":{ "adcode":"310112", "province":"上海市", "city":"上海市", "district":"闵行区" }, "_distance":170.9, "_dir_desc":"西" }] } } |
4.高德地图文档
https://lbs.amap.com/api/webservice/guide/api/georegeo/
接口地址
https://restapi.amap.com/v3/geocode/regeo?output=xml&location=116.310003,39.991957&key=<用户的key>&radius=1000&extensions=all
{
[ ]
,[ ]
,[ ]
[ ]
,[ ]
[ ]
,[ ]
,[ ]
,[ ]
,[ ]
,[ ]
,[ ]
,[ ]
,}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。