Location for an Intersection
The user wants to retrieve the latitude and longitude of the intersection of 'S State St & W Madison St, Chicago, IL USA'.
Request
The following GET request uses the parameter street
to specify the cross-streets and the parameter city
to define in which city to search.
https://geocoder.ls.hereapi.com/6.2/geocode.json
?apiKey={YOUR_API_KEY}
&city=Chicago
&street=State%20%40%20Madison
Response
- metadata about the request
- information about each address that matches the intersection address, including
- match quality
- location information
- address information
{
"response": {
"metaInfo": {
"timestamp": "2018-11-29T10:26:38.500+0000"
},
"view": [
{
"result": [
{
"relevance": 1,
"matchLevel": "intersection",
"matchQuality": {
"city": 1,
"street": [
1,
1
]
},
"location": {
"locationId": "NT_PL5nT7C0c78FqTmyfKw-FA_x_dcbIw9g5JN1KU03adYKFHC",
"locationType": "address",
"displayPosition": {
"latitude": 41.88206,
"longitude": -87.6278
},
"navigationPosition": [
{
"latitude": 41.88206,
"longitude": -87.6278
}
],
"mapView": {
"topLeft": {
"latitude": 41.8831842,
"longitude": -87.6293099
},
"bottomRight": {
"latitude": 41.8809358,
"longitude": -87.6262901
}
},
"address": {
"label": "S State St & W Madison St, Chicago, IL 60603, United States",
"country": "USA",
"state": "IL",
"county": "Cook",
"city": "Chicago",
"district": "Loop",
"street": "S State St & W Madison St",
"postalCode": "60603",
"additionalData": [
{
"value": "United States",
"key": "CountryName"
},
{
"value": "Illinois",
"key": "StateName"
},
{
"value": "Cook",
"key": "CountyName"
},
{
"value": "N",
"key": "PostalCodeType"
}
]
}
}
}
],
"viewId": 0
}
]
}
}