We are integrating Here Autocomplete with our current typeahead feature. Currently this Autocomplete endpoint is not returning any coordinates, and to retrieve them, we must make an additional call to the Geocoding endpoint with the location id. Effectively doubling HERE calls for any one address.
Is there any way that the Autocomplete endpoint can include GPS coordinate?
To find the corresponding geocoordinates based on free-form input, send the following GET request.
https://geocoder.api.here.com/6.2/geocode.json?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&searchtext=425+W+Randolph+Chicago
The response to the above request delivers the following high-level elements:
1) Metadata about the request
Results that match the request.
2) The number of results depends on the completeness of the address provided.
Related
Can someone explain/point to documentation that explains the 'segmentRef' attribute that gets returned by the Here Routing API v8 when spans="segmentRef". An example of what gets returned is shown below. The middle part seems to be the topologyID but I can't figure out the rest. Thanks.
$0:321534451:$1:457679505#-0..0.7675126869621484
In v8, segmentRef is returned instead of PVID. spans conceptually replace link attributes.
Please refer the screenshots of supported link attributes.
For more details please refer the below api guide.
https://developer.here.com/documentation/routing-api/migration_guide/index.html
segmentRef is a parameter used in the HERE Maps API to identify a specific segment of a route. The segmentRef parameter is used to reference a specific segment within the route, and can be used in conjunction with the HERE Routing API to retrieve information about that segment. The information that can be retrieved for a segment includes details such as the start and end coordinates, the length of the segment, and the type of road along which the segment is located.
The segmentRef parameter is typically used in conjunction with other parameters, such as origin and destination, to define the overall route and retrieve information about specific segments within that route.
I need to know the speed limit for some coordinates from the vehicle's trip.
If I do POST request like:
https://fleet.cit.api.here.com/2/calculateroute.json?routeMatch=1&mode=car&attributes=SPEED_LIMITS_FCn(*)&&app_id=APP_ID&app_code=APP_CODE
with body:
LATITUDE,LONGITUDE
37.401996,-122.041338
37.416438,-122.086022
I'm receiving back built route with very many coordinates.
But I'm interested in only two coordinates...
Is there a better way to get speed-limit for a few (~10-100) coordinates?
This will get an array of link and if speed limit is available in map data, it would be returned for the link. linkAttributes and routeAttributes will limit the response of parameters. the default response however can't be limited.
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey=xxx&waypoint0=42.4065,-113.3798&waypoint1=42.2821,-83.74847&mode=fastest;car&inkAttributes=speedLimit,dynamicSpeedInfo&legAttributes=links
speedinfo can come via geocoder API in the form of speed category like below that will be based on the address location.
https://geocoder.ls.hereapi.com/6.2/geocode.json?searchtext=Castro%20St%20Mountain%20View%20Santa%20Clara%20US&gen=9&apiKey=xxxxx&locationattributes=li
I currently have a POC working that retrieves places information using the Places HERE api by passing Lat and Long values. Our addresses are being converted to lat and long before the api is called and we fear we might be losing precision in the process. Instead of feeding the API the coordinates, is there a way to send the actual address and get the address information back? Business name, type, etc?
res = requests.get('https://places.cit.api.here.com/places/v1/discover/here?app_id=<>&app_code=<>&at='+str(lat)+','+str(long))
Based on what I see in the API docs (https://developer.here.com/documentation/places/dev_guide/topics_api/resource-search.html) the answer is no. You can see more detail here as well: https://developer.here.com/documentation/places/dev_guide/topics/location-contexts.html. Is there a particular example of where you think geocoding is returning bad results?
Use Geocoder API to get coordinates for address and then use these coordinates to make a request to Places API.
I am trying to geocode a street interception through Here Geocoder API Forward Geocoding. However, with no success.
There is some example in the documentation:
https://developer.here.com/api-explorer/rest/geocoder/latitude-longitude-intersection
There is an obvious way to do what I want.However, there is a proxy endpoint, which I am not allowed to change and it accepts from client and passes to Here API only free form input.
I tried with the following string for my free form input value,it is the same as the documentation example:
State # Madison, Chicago
But got 0 results.
I just wonder if that is possible at all through Here Forward Geocoding-it seems difficult for implementation without some restriction to the free-form input format?Thanks in advance!
I got the result for street intersection with it, can you please try by using your appkey, id.
https://geocoder.api.here.com/6.2/geocode.json?city=Chicago&street=State%20and%20Madison&app_id=xxxx&app_code=xxxx&gen=9
if the search needs to be in free form, then below API call can work too, but here the search match level is based out of the city, not specific to street.
https://geocoder.api.here.com/6.2/geocode.json?searchtext=200%20S%20Mathilda%20Sunnyvale%20CA&app_id=xxxx&app_code=xxxx&gen=9
I'm currently trying to use the the calculateroute endpoint to avoid certain roads that I specify.
It accepts avoidLinks parameter in which a list LinkIdTypes can be specified which determines the network links to be avoided when calculating the route.
What I'm having trouble finding is how do I get those LinkIdTypes, does Here provide an endpoint to query them (specifiying lat & lng)? or perhaps an endpoint I can use to define my own which then gives me a LinkIdType which I can reuse for future calls?
tl;dr: Where do I get LinkIdTypes for a specific road?
Addendum: I am aware of avoidAreas but this seems too cumbersome to use since I have to specify a bounding box instead of a road segment.
you can get linkId by doing a reverse geocode of a lat,lng.
Exemple of reverse geocode .
LinkId is available in the field ReferenceId.
You can also get the list of linkId of your route with calculateroute using legAttributes=links.
Exemple of calculate route