Route for truck
Routing plan optimized for truck
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 routing plans for various types of trucks
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 for Truck
GET
https://api.fatos.biz/fatos/api/route
Example API Call: https://api.fatos.biz/fatos/api/route?key=YOUR_API_KEY&origin=37.483294848898396,126.89654749206602&destination=37.51702306480502,127.0416190159097&angle=-1&rpoption=1&unixtime=1604626833&gmtoffset=32400&cartype=1
Query Parameters
Name | Type | Description |
---|---|---|
startname | string | Starting place name |
destname | string | Destination name |
weight | number | Vehicle Weight i.e. 45 => 4.5t 55 => 5.5t Default: 4.5t |
height | string | Vehicle Height i.e. 35 => 3.5m 45 => 4.5m Default: 3.5m |
length | string | Vehicle Length i.e. 100 => 10m 150 => 15m Default: 0m |
uturn | string | Available U-Turn Lanes Default: 4 |
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 false: Ignore true: Reflect traffic information Default: false |
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