简体   繁体   中英

How to get the city and state/country information from the HERE Traffic API?

I am using the HERE Traffic API v7 to get incident information within a radius. The response contains the street but no other easily discernible location information. Are there parameters I can add to get the city and country information?

The Traffic API v7 was designed to work with a local map, so that information (which doesn't change between traffic's every minute updates) isn't included in the API response.

You can use one of the location referencing options to map match the traffic information to your map: https://developer.here.com/documentation/traffic-api/dev_guide/topics/concepts/location-referencing.html

Depending on your use case (ie if you don't have a large area you are looking at), you could take the shape points location reference and then reverse geocode the coordinates: https://developer.here.com/documentation/geocoding-search-api/dev_guide/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM