routing-api | An API based on Itinero | REST library
kandi X-RAY | routing-api Summary
kandi X-RAY | routing-api Summary
This project is an implementation of a basic routing API based on Itinero. It loads RouterDb files from a configured folder and exposes one routing instance per file.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Creates a FeatureGroup instance .
- bind touch end events
- Tracks touch events .
- current touch events
- Creates a GeoJSONJSON object .
- Get a function
- Delay the timeout of the call stack .
- Creates a Corner object
- Creates a new instance of the data .
- Simple comparison function .
routing-api Key Features
routing-api Examples and Code Snippets
Community Discussions
Trending Discussions on routing-api
QUESTION
Iam testing routing API(https://developer.here.com/documentation/routing-api/api-reference-swagger.html) and all seems to be working as expect except polyline.
Here I share my service invocation
curl --location --request GET 'https://router.hereapi.com/v8/routes?transportMode=car&origin=3.4844257,-76.5256287&destination=3.478483,-76.517984&routingMode=fast&return=elevation,polyline,actions,instructions,summary&apiKey=1234'
As part of response we have the next field:
"polyline": "B2Fkt10Grm4-xE8yTU4mBnBnG8pBAzP0tBAjD4IA_E8LAvMokBT3IkXTzF8QTnG8QTvMsiBTrJjDA3_BjXoB_sB_OAriB3NAzKjDAnLsTAnLkhBnBzKsdA_J8fTnLkcT3DwHAvC8GArJoQAnL8QA7LsTA7V0jBT_M8UA",
As you know the polyline field is encoded. According to documentation I proceeded to decoded it with a library/code suggested from:
https://github.com/heremaps/flexible-polyline/tree/master/java
The result of decode the field in not correct. The list of points (Lat,Long,Elevation) returned are not matched with the correct location. In the example, the coordinates are from Colombia and the results, after decodification, returns a list of points in a middle of the Atlanthic ocean.
Further, in order to discard library issues I was checking decoding de polyline with other decoder as:
- https://developers.google.com/maps/documentation/utilities/polylineutility
- https://open-polyline-decoder.60devs.com/
And the result is the same.
So, seems to be the problems is HereAPI side(API routing v8)
Any ideas? Maybe I am invoking the API in the incorrect way
...ANSWER
Answered 2022-Feb-17 at 22:37I would suggest removing your API key from the get request you posted in your question.
Using the polyline that you provided gets decoded into the following, which is in Columbia. As a result, I think you need to check the decoder you are using and/or what is being fed into it.
Index Lat Lon Elev 0 3.48437 -76.52567 1003 1 3.48438 -76.52505 1001 2 3.48428 -76.52438 1001 3 3.48403 -76.52365 1001 4 3.48398 -76.52351 1001 5 3.4839 -76.52332 1001 6 3.4837 -76.52274 1000 7 3.48356 -76.52237 999 8 3.48347 -76.5221 998 9 3.48337 -76.52183 997 10 3.48317 -76.52128 996 11 3.48302 -76.52133 996 12 3.482 -76.5217 998 13 3.48128 -76.52194 998 14 3.48073 -76.52216 998 15 3.48056 -76.52221 998 16 3.48038 -76.5219 998 17 3.4802 -76.52137 996 18 3.48003 -76.5209 996 19 3.47987 -76.52039 995 20 3.47969 -76.51994 994 21 3.47963 -76.51982 994 22 3.47959 -76.51971 994 23 3.47944 -76.51945 994 24 3.47926 -76.51918 994 25 3.47907 -76.51887 994 26 3.47872 -76.5183 993 27 3.478512 -76.517966 993QUESTION
I am exploring here.com rest api (v8) for the truck.
My rest api to get directions is as below:
It seems like specifying the truck's height or width does not have any effect or is not recognized. I tried to put some very large values (truck[width]=250000
) as well.
According to here.com official documentation, Rest api v8 we can specify the truck property as below:
...ANSWER
Answered 2021-Dec-24 at 17:59You are specifying the truck property correctly, but it doesn't have any effect because there are no width restrictions in the area. The route is the same with or without the width property because the router didn't find any road that it needs to avoid because it's restricted for trucks of that dimension.
There are however some height and weight restrictions in between your origin and destination. If you specify a height of 500 instead of a width, you will get a route result that looks different that the route you get when you don't set a height. Your query would look like this:
QUESTION
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
- &via=47.774945410,12.103053452;4711
- &destination=47.7720259654,12.09511552052;4712
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
- (a) &via=47.7747679928991,12.322371484945947;name=3333
- returns:
Invalid place option .... Unexpected input at end of place option at 'name=3333'
- returns:
- (b) &via=47.82695713017682,12.295106144134037!name=3333
- returns:
Invalid waypoint option
- returns:
- (c) &via=47.82695713017682,12.295106144134037;4711
- returns:
Place or waypoint option specification '4711' is invalid
- ...
Invalid value for parameter 'via'
- returns:
By the way: I know that there is a difference in the API between
- "PlaceOptions" that follow the coordinates separated by semikolon/";" and
- "WaypointOptions" that are separated by exclamation mark "!".
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.
...ANSWER
Answered 2021-Feb-17 at 10:22You 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:
QUESTION
grossWeight = 20000 kg
height = 5000 centimeters
length = 9000 centimeters
I have already read this
https://developer.here.com/documentation/routing-api/8.9.1/api-reference-swagger.html
but I don't understand how to use these parameters
my example route, bridge traffic for trucks is prohibited
map with Weight restrictions, my test route bridge marked as yellow
my postman request example
in response from the server I get this polyline :
BG0zu0sDok2-tB7WkQvRwMnGgF3IwHzFoGnG0KrE4IjD4IrEgPjDoLzUrOrEjD_EjDnL7G7L_EvMrEvMvC7LnB7GUvHoBnLkDvMoGzKoGzjB8V_nBsYjNwH7a0P3XkNoGkhBoBwHkDkS0F8fsJozBgFkcwC8LwC8LzoBkcnG7f_EnajDnQ3DrTvMv-B7B_JnG7fnBnGnBnGnB7GnBnGvHrnB3S3iDzP7xC7G7kBrYz9DrJjwBnBnGnB7GnB7G_ErY3DzU8BvRAnLT3N7BnajDnkBvCrdvCvMrJ7zBzFnf3D3SrE_YTrE_Jz8BjI3wBnBvHnGvlBvC_O7B7LTjD3NvyC3DrY_T0U3S0ZsT4iDwCwMgFkXsJ8fwMgyBUgFoBgK4D0ZwCgPsEgZkDwRkD8Q4DsTzFoG7QwW9NuS
and here is decoded route
The correct route should look something like this
Question:
- How to specify these parameters correctly?
- Does the response come with instructions that the grossweight parameter was taken into account when laying this route?
ANSWER
Answered 2020-Nov-17 at 18:48Regarding Documentation the "grossWeight" is a property of "truck" object parameter therefore in the request should be truck[grossWeight]=20000,
if you want specify additional truck restriction e.g. "height" then "truck" parameter will be truck[grossWeight]=20000&truck[height]=365
We have Routing API playground there and new one there there you can see how and which parameters could be defined:
No, it doesn't provide in response that the grossWeight parameter was taken because so was designed.
QUESTION
Routing v7 API is available to construct an Isoline from a given location, but I notice v8 API doesn't seem to mention this feature at all. Is it just not in yet? Or is it not expected to be supported after v7?
...ANSWER
Answered 2020-Aug-06 at 10:02The Isoline Routing feature will be available in the Routing API v8 very soon. Follow our developer blog for an announcement when it is out.
QUESTION
I have a problem with Here Maps Routing API v8.
Altough the documentation states that:
but a request may specify many more intermediate waypoints with via as well. See Route Via Intermediate Waypoint for examples.
... I am at a loss how to create a request with one origin/destination and two or more waypoints. In v7 we had a single waypoints parameter which allowed unlimited waypoints.
In v8, I tried something like: &via=52,13;51,14&.. to send two via points, but that doesn't work.
The v8 documentation (which feel rushed/unfinished) doesn't help, and neither their only example, which only illustrates the use of a single via waypoint.
Help please!!! .
...ANSWER
Answered 2020-May-26 at 10:32You need to add as many times via={lat},{lng}
as you have waypoints:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install routing-api
Install .NET core for your platform.
Run the build script, build.sh or build.bat on windows.
Then download a RouterDb file or create one using the Itinero data processing tool.
Place the RouterDb file into the configured data folder, by default this is ./src/Itinero.API/data. Configuration file is here.
Run the run script, run.sh or run.bat on windows.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page