I am sure it's possible to retrieve speed limit on the road based on coordinates. I just can't find any example (rest API). As I understand I need to use routing mechanism to do that?
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Laravel 5.1 MethodNotAllowedHttpException on store
- Error trying to run here example on Flutter
相关文章
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Global Exception Handling in Jersey & Spring?
- REST search interface and the idempotency of GET
- Getting error detail from WCF REST
- Send a GET request with a body in JavaScript (XMLH
- GuzzleHttp Hangs When Using Localhost
- JAX-RS (Jersey) ExceptionMapper - @Context injecti
At the moment this gives you the speed limit from HERE:
https://route.cit.api.here.com/routing/7.2/calculateroute.json?waypoint0=52.5308,13.3846&waypoint1=52.5308,13.3846&legattributes=li&mode=fastest;car&app_code=your_app_code&app_id=your_app_id
To get the speed limit you need to pass the argument
legattributes=li
. ThespeedLimit
element is still returned in m/s so multiply by 3.6 for km/h or 2.23 for mph as Jason Fox mentioned.UPDATE: Since Nokia maps renamed to HERE maps, its good practice to use their new HERE API.
Check their documentation how to use it with GPS coordinates.
UDPATE: For others that see this question now:
The answer above doesn't work anymore (it doesn't return anything) - you need to use API 7.2 now:
http://route.st.nlp.nokia.com/routing/7.2/getlinkinfo.json?waypoint=52.5308,13.3846&app_id=your_app_id&app_code=your_app_code
Maybe that helps someone!
UPDATE
getlinkinfo
will depreciated 31.03.2017. You will have to use Platform Data Extension.HERE Speed Limit via PDE Demo
--------------
UPDATE - 2
I've got an email from HERE:
You may use the HERE ReverseGeocoder with parameter "locationattributes=linkInfo" to get the speed and some more usefull information. Example response:
See the full details at https://developer.here.com/documentation/geocoder/topics/resource-reverse-geocode.html
You will need to use the
getLinkInfo
endpoint from the Enterprise Routing API.. ThespeedLimit
element returned is in m/s so multiply by 3.6 for km/h or 2.23 for mph. If thespeedLimit
element is missing then the national speed limit applies.http://route.st.nlp.nokia.com/routing/6.2/getlinkinfo.json?waypoint=52.5308,13.3846&app_id=your_app_id&app_code=your_app_code
A working example can be found on the HERE Maps Community Examples on GitHub