Mapbox Shortest path for routing API - mapbox

For "driving-traffic" or "driving profile" i need to fetch shortest path from point A to B. Does "alternatives" option helps or am i missing something.

You indeed can use alternatives. There are more options to play with incl. Avoid highways.. no ferry ( might be shorter but higher cost (time schedule)
A route calculation gives back total time and distance, so play around with it!

Related

What are LID, LE and FW in responses of here traffic API?

I am struggling to understand the response of here API traffic flow data. I went through the documentation but it seems that there are some important missing parts there.
For instance, details on returned parameters such as "LID", "LE", "FW" and "Criticality" are missing in the documentation. Also, the difference between "Original_traffic_item_id" and "traffic_item_id" in the response from incident API is completely missing. Or what is "TPEGOpenLRBase64"?
Here are links to pages which contain an example of such responses:
https://developer.here.com/documentation/traffic/dev_guide/topics_v6.1/example-flow-location-references.html
https://www.developer.here.com/documentation/traffic/dev_guide/topics/example-incidents-tmc-restrictions.html
https://www.developer.here.com/documentation/traffic/dev_guide/topics/incident-data.html
Am I missing something? Is there any other specific documentation somewhere that I have been unable to find?
Please find the description of the element name for traffic API-
TPEGOpenLRBase64 -[Binary data]Provided if TPEGOpenLRBase64 is the location referencing type for the containing RWS.
SHP/LID - [LinkID] The linkID will be in driving direction order; “F” represents travel direction FROM reference node, “T” represents travel direction TO reference node (For example 123456789T or 987654321F).
SHP/LE -Length of stretch of road defined by SHP element. The units are defined in the file header.
SHP/FW- Form of way. Possible values are Motorway (MW), Multi-digitized road which is not a motorway(MD), single digitized road (SD), Ramp/Slip (RA), Roundabout (RO), Undefined (UN).
For more acronym check this-
https://developer.here.com/documentation/traffic/dev_guide/topics/common-acronyms.html

Retrive all districts based on city name from REST query

I've searched for solution for that problem on here-api documentation but I can't really find it out ! I'm starting doubt if this even possible.
Ok so basicly what i need to know for now:
1. Is this even possible on this platform ?
2. Using exactly which 'module' (eg. PLATFORM DATA EXTENSION,BATCH GEOCODER)
There is no straight solution to get all districts in a city since district concept varies from one place to another(country-specific). Still you can try one of the below options:
administrative-areas-buildings category in places api
city-town-village category in places api
retrieveAreas mode in geocoder api (apply bbox or increase the radius of prox parameter and see if it works for your location)
Search Text in geocoder can also be used if you are search for districts which match a regex
You can check if the above 1) and 2) are applicable to your location using https://places.demo.api.here.com/places/v1/categories/places?at=41.8369%2C-87.684&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg

How to use OSRM's match service

As stated in the header: how can I use the match call?
I tried
http://router.project-osrm.org/match/v1/driving/8.610048,46.99917;8.530232,47.051?overview=full&radiuses=49;49
I am not sure, whether the list of radiuses is given correctly.
I can't get it work. I also tried [49;49] or {49;49} The command works with route:
http://router.project-osrm.org/route/v1/driving/8.610048,46.99917;8.530232,47.051?overview=full
For backround see here
Edit: If you look at the example here, itr seems, the timestamps are not needed /match/v1/{profile}/{coordinates}?steps={true|false}&geometries={polyline|polyline6|geojson}&overview={simplified|full|false}&annotations={true|false}
From the docs:
Large jumps in the timestamps (> 60s) or improbable transitions lead to trace splits if a complete matching could not be found.
I think that's the problem with your request. The two given points are more than 60s appart and OSRM cannot match them successfully. The radiuses are specified correctly.
The following query works for me:
http://router.project-osrm.org/match/v1/driving/8.610048,46.99917;8.620048,46.99917?overview=full&radiuses=49;49
This returns:
{"tracepoints":[{"location":[8.610971,46.998963],"name":"Alte Kantonstrasse","hint":"GKUFgJEhBwAAAAAAHQAAAAAAAAC5AAAAAAAAAB0AAAAAAAAAuQAAAPsCAACbZIMAsyXNAgBhgwCCJs0CAAAPABki8hY=","matchings_index":0,"waypoint_index":0,"alternatives_count":0},{"location":[8.620295,46.999681],"name":"Schönenbuchstrasse","hint":"nIEFAJ7IFIA3AAAAZAAAAAAAAADYAAAANwAAAGQAAAAAAAAA2AAAAPsCAAAHiYMAgSjNAhCIgwCCJs0CAAAPABki8hY=","matchings_index":0,"waypoint_index":1,"alternatives_count":5}],"matchings":[{"distance":922.3,"duration":114.1,"weight":114.1,"weight_name":"routability","geometry":"onz}Gqyps#Wg#S_#aCaFMUYo#c#w#OKOCWmAWs#aBiDsAsCMYH[HY\\_#h#ObBW^w#BQAUKu#ASF[ZaABOFYpAyIf#mD","confidence":0.000982,"legs":[{"distance":922.3,"duration":114.1,"weight":114.1,"summary":"","steps":[]}]}],"code":"Ok"}
So the two given input points 8.610048,46.99917 and 8.620048,46.99917 are matched to 8.610971,46.998963 and 8.620295,46.999681.
So as far as I can see, if you want to implement something like that, you need to give OSRM more input points on its way which are less than 60s apart.
See also here for an explanation about the differences between route and match service.

SAPUI5: set Timepicker configuration for 15 min interval

Is is possible to configure the sap.m.TimePicker to display only 15 minute intervals?
At the moment the user can enter any time they like.
It's possible now with version 1.40.+
There was incorrect information in the API documentation and it wasn't possible even on version 1.38
Change it to a DropDownBox with a value range of 00:00, 00:15, 00:30, ... 23:30, 23:45? This makes the limitation to specific intervals clear at a glance, is easy to implement and avoids entry of undesired values altogether.
While #vwegert 's answer is function I think there is a better way where you you still get the look and feel of the TimePicker.
In the source of the control there is a property minutesStep. If you can set this in the xml or js definition I think you could be onto a winner.
In fact there is a setter (yay) setMinutesStep.
oTimer.setMinutesStep(15); should be a winner for you.
Hope that helps,
Nigel

iPhone: Turning latitude/longitude into "major cross-streets"

Using the MKReverseGeocoder or GoogleAPI or MapKit...
Is there a simple way to turn a latitude/longitude into "nearest major cross-streets"?
A user might not have any idea where "12345 Pineapple" is located... so I want to show something like "Pineapple and Main"... or (larger, major roads) like "US-140 and Hwy 76".
I don't really care what "major" is defined as... perhaps any road with higher speed limits... or more than 3 lanes... etc.
I don't really care what "close by" is defines as... perhaps within 0-10 miles... or just "closest found".
There is not a built in method to do this with MapKit or the Google API.
See this SO question for some reading about this in relation to the GoogleMaps API:
Is there a way to find the nearest cross streets for an address?