I need to get the coordinates of all route points through the CURL - in the HERE API documentation, I did not click on how to do it. Tell me what you need to create a request or give a link to the HERE documentation
With HERE Routing v8 API, you can get the route shape by specifying return=polyline in the query parameters, as shown in this guide.
Keep in mind however, that this returns a so-called "flexible polyline", which is an encoded representation of the route shape coordinates. It looks like this:
"polyline": "BGwynmkDu39wZvBtFAA3InfAAvHrdAAvHvbAAoGzF0FnGoGvHsOvRAA8L3NAAkSnVAAoGjIsEzFAAgFvHkDrJAAwHrJoVvb0ezoBAAjInVAA3N_iBAAzJ_Z"
You can use a decoder to get the coordinates. Here is a JS implementation of the decoder. The heremaps/flexible-polyline contains implementations in several other languages.
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.
im looking to reduce the size of the responses when calculate route, currently im using maneuverAttributes=sh so the response is long, but there are fields im not using at all, like instruction text and street names, i didnĀ“t find how to avoid those in the response. It is possible?
Also, there is any "definition" setup i can make for the route shape? my intention is to receive a approximate of the route shape, using only the legs is way to generic, but the points for the route shape are way too detailed for my use case, and i want to reduce the response size and memory use in the app.
I'm totally novice for Rest Api, so i'm looking for example code. I've a set of geographical coordinates taken from a database and I need to find best route among these. I'm using Bing Maps, let say I have an idea how to code the Rest request, my problem is how parse and manage the JSON response to draw the route on the map in a asp.net page.
Assuming you're using the Bing V8 HTML control, the directions module will handle making the REST request and displaying the result for you - there's no need to parse the REST response directly yourself. See https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/directionscreatedrivingroute
If you're using one of the other controls, similar modules are available.
I've found this JSON, is a step to step guide to request and consume JSON response.
For our use case, we need a turn-by-turn navigation on a mobile device but using a custom route.
Please let me know if the following usage scenario is possible:
Given an array of points (lat/long) that the route needs to pass through, get a route using CalculateRoute.
Create a deeplink for HERE WeGo (e.g. iOS) using the sequence of waypoints obtained in step #1
Navigate turn by turn in HERE WeGo along the route
So far I was successful in #1 but could not create a deeplink with the same route for HERE WeGo. When I create a link, the app simplifies the route to only include origin and destination points and omits all "via" points.
Would appreciate advice on this.
In general passing the waypoints one after the other should open the route with the intermediate points (at least on wego.here.com) , not so sure if this work out of the box in HERE WE Go https://developer.here.com/documentation/deeplink-web/dev_guide/topics/share-route.html
Is it possible to limit the search area for Google Places in an http request? The website mentions bounds are possible (using SW and NE lat and long for the corners) for the javascript method but I would like to stick to the http request because I know nothing about javascript. Any help would be really appreciated because I am struggling with this. Thank you!
So, your http request should be something similar to this:
https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters
There are a required set of parameters, including the radius parameter (unless rankby=distance is set) that need to be used with the places api. The radius parameter is what you are looking for, the maximum allowed value is 50,000. The units are in meters, so the maximum distance would be 50km.
An example http api call would look something like this:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AddYourOwnKeyHere
This will output the requested places of type 'food' within a 500m radius of a point in Sydney, Australia, containing the word 'harbour' in their name. The data will be returned in the Json format. You may be working with XML data instead of Json, if that's the case then just replace json with xml in the http request.
More information on using the Places API can be found Here.