ジオコードリクエスト
自由形式の入力に基づいて対応するジオコード化を検索するには、次の get リクエストを送信します。
https://geocoder.ls.hereapi.com/6.2/geocode.json
?apiKey={YOUR_API_KEY}
&searchtext=425+W+Randolph+Chicago
注 : この例 では、 HERE API キー を使用してリクエストを認証します。 使用可能な認証オプションについて は、『 Identity & Access Management 開発者ガイド』を参照してください。
上記のリクエストに対する応答では、次のハイレベルな要素が提供されます。
- リクエストについてのメタデータ
- リクエストに一致する結果。結果の数は、提示された住所の完全性によって異なります
{"Response": {
"MetaInfo": {"Timestamp": "2016-11-02T13:24:11.575+0000"},
"View": [{
"_type": "SearchResultsViewType",
"ViewId": 0,
"Result": [{
"Relevance": 1,
"MatchLevel": "houseNumber",
"MatchQuality": {
"City": 1,
"Street": [0.9],
"HouseNumber": 1
},
"MatchType": "pointAddress",
"Location": {
"LocationId": "NT_Opil2LPZVRLZjlWNLJQuWB_0ITN",
"LocationType": "point",
"DisplayPosition": {
"Latitude": 41.88432,
"Longitude": -87.6387699
},
"NavigationPosition": [{
"Latitude": 41.88449,
"Longitude": -87.6387699
}],
"MapView": {
"TopLeft": {
"Latitude": 41.8854442,
"Longitude": -87.6402799
},
"BottomRight": {
"Latitude": 41.8831958,
"Longitude": -87.6372599
}
},
"Address": {
"Label": "425 W Randolph St, Chicago, IL 60606, United States",
"Country": "USA",
"State": "IL",
"County": "Cook",
"City": "Chicago",
"District": "West Loop",
"Street": "W Randolph St",
"HouseNumber": "425",
"PostalCode": "60606",
"AdditionalData": [
{
"value": "United States",
"key": "CountryName"
},
{
"value": "Illinois",
"key": "StateName"
},
{
"value": "Cook",
"key": "CountyName"
},
{
"value": "N",
"key": "PostalCodeType"
}
]
}
}
}]
}]
}}