Reputation: 459
I have to calculate some routes for bringing up do 8 people in a larger car (minibus) to a workplace and bring them home in the afternoon. Is is possible to add an ID attribute to the coordinates? That would help me to evaluate the responses in my Java Code instead of checking the Coordinates ("originalLocation" vs "location").
For example something like that ID 4711 at the end and separated by semicolon
Something like the UserLabel in Routing V7 API: [API V7 Waypoint description] (https://developer.here.com/documentation/routing/dev_guide/topics/resource-param-type-waypoint.html#resource-param-type-waypoint__navigation-waypoint-link-positions). The description there said: waypoint in V8: string, {lat},{lng}[;name={name}]
I am using or experimenting with HERE Routing API V8. Or are there more options somewhere in the multiple HERE Telematics APIs that I can see on the Homepage?
I tried some things described in the migration guide (https://developer.here.com/documentation/routing-api/8.20.1/migration_guide/index.html) but they did not work
Invalid place option .... Unexpected input at end of place option at 'name=3333'
Invalid waypoint option
Place or waypoint option specification '4711' is invalid
Invalid value for parameter 'via'
By the way: I know that there is a difference in the API between
The PlaceOptions seem to be fixed specified parameters like course, sideOfStreetHint, stopDuration etc and therefore I thought that the WaypointOptions should be the way to go. But still no luck.
Upvotes: 1
Views: 430
Reputation: 6925
You are right, it seems that the name
option has been removed and the Migration Guide does not reflect that. Looking forward to getting HERE Developer Support's response, maybe there is an undocumented option for labeling the waypoints.
According to the latest API documentation (v8.20.1), these are all the available options for the via
parameter:
A location defining a via waypoint.
A via waypoint is a location between origin and destination. The route will do a stop
at the via waypoint.
Multiple waypoints can also be specified using multiple via parameters like
`via=...&via=...`, in which case the route will traverse these waypoints sequentially in
the order specified in the request.
## Format
Format: `Place[WaypointOptions]`
* Place: `{lat},{lng}[PlaceOptions]`
* PlaceOptions: `;option1=value1;option2=value2...`
* WaypointOptions: `!option1=value1!option2=value2...`
A waypoint consists of:
* Exactly one place
* Optional settings for the place
* Optional settings for the waypoint itself
Supported place options:
* `course`: int, degrees clock-wise from north. Indicating desired direction at the place.
E.g. `90` indicating `east`. Often combined with `radius` and/or `minCourseDistance`
* `sideOfStreetHint`: `{lat},{lng}`. Indicating the side of the street that should be
used. E.g. if the location is to the left of the street, the router will prefer using
that side in case the street has dividers. E.g.
`52.511496,13.304140;sideOfStreetHint=52.512149,13.304076` indicates that the `north`
side of the street should be preferred. This option is required, if `matchSideOfStreet`
is set to `always`.
* `matchSideOfStreet`: enum `[always, onlyIfDivided]`. Specifies how the location set by
`sideOfStreetHint` should be handled. Requires `sideOfStreetHint` to be specified as
well.
+ `always` : Always prefer the given side of street.
+ `onlyIfDivided`: Only prefer using side of street set by `sideOfStreetHint` in case
the street has dividers. This is the default behavior.
* `nameHint`: string. Causes the router to look for the place with the most similar name.
This can e.g. include things like: `North` being used to differentiate between
interstates `I66 North` and `I66 South`, `Downtown Avenue` being used to correctly
select a residental street.
* `radius`: int, meters. Asks the router to consider all places within the given radius as
potential candidates for route calculation. This can be either because it is not
important which place is used, or because it is unknown. Radius more than 200meter are
not supported.
* `minCourseDistance`: int, meters. Asks the routing service to try find a route that avoids actions for
the indicated distance. E.g. if the origin is determined by a moving vehicle, the user
might not have time to react to early actions.
Supported waypoint options:
* `stopDuration`: desired duration for the stop, in seconds.
* `passThrough`: boolean. Asks the router to avoid the following during route calculation:
+ Introducing a stop at the waypoint.
+ Splitting the route into sections.
+ Changing the direction of travel.
Following scenarios are not supported for `passThrough` parameter:
+ Setting both `stopDuration` to a value greater than 0 and `passThrough=true`.
+ Setting `passThrough=true` for `origin` or `destination` of a route.
The default value is `false`.
Notes:
* Non-structural reserved characters in options' values need to be properly percent-encoded.
Please refer to the developers' guide for more details.
That said, I guess the only way for you to have labels is to somehow assign a label per waypoint in your Java code.
Upvotes: 1