Route
Flexible instructions to the destination
The Routing API will show you how to get where you’re going. With the Routing API, you can:
Provide precise instructions to a destination using various transport modes (e.g., car, public transit, bicycle).
To request directions, call four values: a start point, destination, and car type, and waypoint (optional).
See the API Key Issuance page for information on using keys.
Routing API
GET
https://api.fatos.biz/nostra/api/route
Example API Call: https://api.fatos.biz/nostra/api/route?key=YOUR_API_KEY&origin=13.729139,100.493947&destination=13.746328,100.512601&angle=-1&rpoption=3&unixtime=1604626833&gmtoffset=32400
Query Parameters
startname
string
Starting place name
destname
string
Destination name
hipass
integer
0: None 1: Yes Default: 0
fueltype
integer
0: Gasoline 1: Diesel 2: LPG 3: CNG 4: Electric 5: BioDiesel
pattern
integer
Reflect pattern information 0: Ignore 1: Reflect pattern information Default: 0
gmtoffset
string
Timezone
unixtime
string
Time when requesting for RP
traffic
integer
Reflect traffic information 0: Ignore 1: Reflect traffic information Default: 0
carspeed
integer
0~255 Default: 0
reqtype
string
0: Initial RP request 1. Retry RP request on route deviation 2. User RP request 3. Periodic RP request 4. Request Route detail Default: 0
origin
string
Start point (lat, lng)
destination
string
End point (lat, lng)
key
string
Your API Key
via
number
Waypoint (lat, lng), In the case of multiple waypoints, list them in order in the query string.
cartype
integer
car type 101: 2 Axles, less than 16 persons 102: 2 Axles, less than 32 persons 103: 2 Axles, less than 33 persons 104: 3 Axles, between 10 to 20 Ton 105: 4 Axles or above (Over 20 Ton) 106: 2 Axles, less than 1000cc 111: Truck with dangerous load 112: Truck 113: Construction Machinery 114: Construction Vehicle 115: Trailer 116: Farm Vehicle 121: Bus 122: Taxi 123: Taxi without passenger 124: Cart 125: HOV 126: Emergency 127: Motorcycle 128: 3 Wheel Motorcycle 141: Bicycle 142: Tricycle 143: Pedestrian 144: Pet 145: WheelChair 146: Visually Impaired
rpoption
integer
Routing Plan Option Sum of each option value. 1: Recommended 1 2: Recommended 2 4: Highway Priority 8: General road Priority 16: Shortest Distance 32: Free road (in the shortest time) 64: Exclude Car-only 256: Free road (in the shortest distance) ex) rpoption 3 => Recommended 1 + Recommended 2
gpsangle
number
degrees (0~359)
Display of Directions Results
After you receive the requested results, you must decode the result into a geometry code. Call the Fatos.polyLine() function as the decoded result and display the result on the map.
Last updated