通用經(jīng)緯度查詢(POI級別)
對輸入的地址文本做經(jīng)緯度坐標查詢,精確到POI;返回經(jīng)緯度中包含GCJ02和WGS84兩種坐標系。
測試
您可以在地址標準化產(chǎn)品控制臺進行API測試。
請求參數(shù)
名稱 | 類型 | 是否必選 | 示例值 | 描述 |
Action | String | 是 | GetAddressGeocode | 系統(tǒng)規(guī)定參數(shù)。 取值:GetAddressGeocode。 |
AppKey | String | 是 | Axqwerasdf1a | 項目AppKey |
ServiceCode | String | 是 | addrp | 固定值:addrp |
Text | String | 是 | 阿里巴巴西溪園區(qū) | 文本內(nèi)容 |
DefaultProvince | String | 否 | 浙江省 | 默認省份 |
DefaultCity | String | 否 | 杭州市 | 默認城市 |
DefaultDistrict | String | 否 | 余杭區(qū) | 默認行政區(qū) |
返回參數(shù)
名稱 | 類型 | 示例值 | 描述 |
Data | String | {"offline_geocode":{"wgs84":"120.02151877289762,30.28154270777058","gcj02":"120.026268,30.279164"},"status":"OK","time_used":{"rt":{"div_search":0.000041484832763671875,"segment":0.000012159347534179688,"geocode":0.00009250640869140625,"address_correct":0.004271745681762695,"address_search":0.0651092529296875,"structure":0.009287357330322266},"start":1619333621.2547765}} |
|
RequestId | String | E0627DDE-28D7-4C00-A611-E047DF81AF05 | RequestId |
示例
請求示例
http(s)://[Endpoint]/?Action=GetAddressGeocode
&AppKey=Axqwerasdf1a
&ServiceCode=addrp
&Text=阿里巴巴西溪園區(qū)
&<公共請求參數(shù)>
正常返回示例
XML格式
<RequestId>23182B3F-F35D-4993-B2AF-44396C36DB5B</RequestId>
<Data>
<offline_geocode>
<wgs84>120.02151877289762,30.28154270777058</wgs84>
<gcj02>120.026268,30.279164</gcj02>
</offline_geocode>
<status>OK</status>
<time_used>
<rt>
<div_search>0.000041484832763671875</div_search>
<segment>0.000012159347534179688</segment>
<geocode>0.00009250640869140625</geocode>
<address_correct>0.004271745681762695</address_correct>
<address_search>0.0651092529296875</address_search>
<structure>0.009287357330322266</structure>
</rt>
<start>1619333621.2547765</start>
</time_used>
</Data>
JSON格式
{
"RequestId": "23182B3F-F35D-4993-B2AF-44396C36DB5B",
"Data": {
"offline_geocode": {
"wgs84": "120.02151877289762,30.28154270777058",
"gcj02": "120.026268,30.279164"
},
"status": "OK ",
"time_used ": {
"rt ": {
"div_search": 0.000041484832763671875,
"segment": 0.000012159347534179688,
"geocode": 0.00009250640869140625,
"address_correct": 0.004271745681762695,
"address_search": 0.0651092529296875,
"structure": 0.009287357330322266
},
"start": 1619333621.2547765
}
}
}
錯誤碼
HttpCode | 錯誤碼 | 錯誤信息 | 描述 |
403 | Forbidden.NoAuth | Failed to perform user authentication. | 用戶鑒權失敗 |
500 | InternalError | A service error occurred. | 服務內(nèi)部異常 |
400 | InvalidParameter | The parameter is invalid. | 參數(shù)無效 |
404 | ResourceDoesNotExist | The resource does not exist. | 資源不存在 |
429 | Throttling.User | Flow control has been triggered. | 觸發(fā)流控 |
400 | UserStatusInvalid | The user status is invalid. | 用戶狀態(tài)無效 |
訪問錯誤中心查看更多錯誤碼。