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/onemap/api/route

​Example API Call: https://api.fatos.biz/onemap/api/route?key=YOUR_API_KEY&origin=1.2831649376950907,103.85077031219595&destination=1.2799023501360551,103.8370225383909&angle=-1&unixtime=1604627262&gmtoffset=32400&via=1.2772182738798392,103.84112200075987&servicesvr=2&rpoption=49&cartype=1

Query Parameters

Name
Type
Description

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 1: compact 2: standard 3: full size 6: minicompact

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

angle

number

degrees (0~359)


{
   "routes":[
      {
         "copyrights":"지도 데이터 ©2019 FATOS Co,. Ltd",
         "bounds":{
            "northeast":{
               "lat":1.2864054861293823,
               "lng":103.85130584069276
            },
            "southwest":{
               "lat":1.2734708013814782,
               "lng":103.83466517755289
            }
         },
         "legs":[
            {
               "distance":{
                  "text":"",
                  "value":4834
               },
               "duration":{
                  "text":"",
                  "value":1340
               },
               "start_address":"",
               "start_location":{
                  "lat":1.2831286611796031,
                  "lng":103.85126387902284
               },
               "end_address":"",
               "end_location":{
                  "lat":1.28010932829514,
                  "lng":103.83666503259354
               },
               "steps":[
                  {
                     "attr":271069698,
                     "distance":{
                        "text":"",
                        "value":311
                     },
                     "duration":{
                        "text":"",
                        "value":85
                     },
                     "start_location":{
                        "lat":1.2831286611796031,
                        "lng":103.85126387902284
                     },
                     "end_location":{
                        "lat":1.2850379171602242,
                        "lng":103.85042655297343
                     },
                     "maneuver":"2",
                     "htmlInstructions":"|||||||Turn left ",
                     "laneguide":"",
                     "polyline":{
                        "points":"qbimA_oqaeEob@sA??sCx{@oe@Ysg@_D",
                        "mbr":{
                           "minx":103.85033309289042,
                           "miny":1.2831286611796031,
                           "maxx":103.85130584069276,
                           "maxy":1.2850379171602242
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  },
                  {
                     "attr":271069708,
                     "distance":{
                        "text":"",
                        "value":321
                     },
                     "duration":{
                        "text":"",
                        "value":86
                     },
                     "start_location":{
                        "lat":1.2850379171602242,
                        "lng":103.85042655297343
                     },
                     "end_location":{
                        "lat":1.2863730612026245,
                        "lng":103.84783541985684
                     },
                     "maneuver":"12",
                     "htmlInstructions":"|||||||keep the left lane ",
                     "laneguide":"",
                     "polyline":{
                        "points":"{ylmAuzoaeEaB|LaHpN??gI`R??}EzK??}Rna@??kPra@??{Oj^",
                        "mbr":{
                           "minx":103.84783541985684,
                           "miny":1.2850379171602242,
                           "maxx":103.85042655297343,
                           "maxy":1.2863730612026245
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  },
                  {
                     "attr":271069698,
                     "distance":{
                        "text":"",
                        "value":9
                     },
                     "duration":{
                        "text":"",
                        "value":36
                     },
                     "start_location":{
                        "lat":1.2863730612026245,
                        "lng":103.84783541985684
                     },
                     "end_location":{
                        "lat":1.2864054861293823,
                        "lng":103.84775531121431
                     },
                     "maneuver":"2",
                     "htmlInstructions":"|||||||Turn left ",
                     "laneguide":"",
                     "polyline":{
                        "points":"imomAuxjaeE_A~C",
                        "mbr":{
                           "minx":103.84775531121431,
                           "miny":1.2863730612026245,
                      ........
                      ........
                  {
                     "attr":1384708,
                     "distance":{
                        "text":"",
                        "value":126
                     },
                     "duration":{
                        "text":"",
                        "value":40
                     },
                     "start_location":{
                        "lat":1.2826031866314906,
                        "lng":103.8367470485847
                     },
                     "end_location":{
                        "lat":1.2827748480083585,
                        "lng":103.83563506433228
                     },
                     "maneuver":"4",
                     "htmlInstructions":"|||||||Turn slightly left ",
                     "laneguide":"",
                     "polyline":{
                        "points":"uahmAucu`eEaFjR??k@vB_EfYH|FjBfK",
                        "mbr":{
                           "minx":103.83563506433228,
                           "miny":1.2826031866314906,
                           "maxx":103.8367470485847,
                           "maxy":1.2828339758159473
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  },
                  {
                     "attr":1712642,
                     "distance":{
                        "text":"",
                        "value":215
                     },
                     "duration":{
                        "text":"",
                        "value":63
                     },
                     "start_location":{
                        "lat":1.2827748480083585,
                        "lng":103.83563506433228
                     },
                     "end_location":{
                        "lat":1.2810773077258943,
                        "lng":103.83466517755289
                     },
                     "maneuver":"2",
                     "htmlInstructions":"|||||||Turn left ",
                     "laneguide":"",
                     "polyline":{
                        "points":"mlhmAe~r`eEdU|J??`g@`T??pIpDrLdFrE~C??`LzH",
                        "mbr":{
                           "minx":103.83466517755289,
                           "miny":1.2810773077258943,
                           "maxx":103.83563506433228,
                           "maxy":1.2827748480083585
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  },
                  {
                     "attr":1712644,
                     "distance":{
                        "text":"",
                        "value":54
                     },
                     "duration":{
                        "text":"",
                        "value":23
                     },
                     "start_location":{
                        "lat":1.2810773077258943,
                        "lng":103.83466517755289
                     },
                     "end_location":{
                        "lat":1.2806891622792875,
                        "lng":103.83497035333403
                     },
                     "maneuver":"4",
                     "htmlInstructions":"|||||||Turn slightly left ",
                     "laneguide":"",
                     "polyline":{
                        "points":"ibemAqaq`eEfSkM~BuC",
                        "mbr":{
                           "minx":103.83466517755289,
                           "miny":1.2806891622792875,
                           "maxx":103.83497035333403,
                           "maxy":1.2810773077258943
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  },
                  {
                     "attr":1712690,
                     "distance":{
                        "text":"",
                        "value":471
                     },
                     "duration":{
                        "text":"",
                        "value":84
                     },
                     "start_location":{
                        "lat":1.2806891622792875,
                        "lng":103.83497035333403
                     },
                     "end_location":{
                        "lat":1.28010932829514,
                        "lng":103.83666503259354
                     },
                     "maneuver":"50",
                     "htmlInstructions":"|||||||your destination ",
                     "laneguide":"",
                     "polyline":{
                        "points":"ajdmAstq`eE??t@mBc@{LeCoHmDwG{^kRkSyKyCwCsByCaAcFBkG`DgHfKaTtF_InDeDlJaA`aApa@",
                        "mbr":{
                           "minx":103.83497035333403,
                           "miny":1.28010932829514,
                           "maxx":103.83721816369683,
                           "maxy":1.2818392935043619
                        }
                     },
                     "travelMode":"DRIVING",
                     "roadObject":"",
                     "complexIntersection":"",
                     "serviceArea":"",
                     "tollgate":""
                  }
               ],
               "trafficSpeedEntryList":[
                  
               ],
               "viaWaypoints":[
                  
               ]
            }
         ],
         "overviewPolyline":{
            "points":"qbimA_oqaeEob@sA??sCx{@oe@Ysg@_D??aB|LaHpN??gI`R??}EzK??}Rna@??kPra@??{Oj^??_A~C??x{@vb@??tY`P??nCpClVnK??|Av@|VzL??f^zQ??|XhN??zSjK??jIfE??~[~O??pYnN??zDpB??nS~J??hMjF??fDvF??dPfNzIrHzG`K??~]xq@??nJlT??pF~LnHtK??zT|R??fX`V??dOvM~DtFlHjP??lKxVnCfK??rXmE??vSwClEo@??f@E??doAaK|Fw@ta@uF??~OcDjGoAn`@gI??pJoD??|GeC??tZaM??dNqHfImE??fHeBnETjFlB??pDbBlFjB??|BtsB??uE\\yFE??aCf@eIC??eEs@??kMmJ??eUk`@iP{U??}WaP??o`@fIkGnA_PbD??ua@tF}Fv@mpAfK??mEn@wSvC??sXlE??yD`Bo~@`a@??kS`K{E`B??eI~C??iHxB}NjC??aObDuFnBqMxI??sa@l]??wMhM??aJxIuZ`l@sAfC??eBbD??uU|c@??aFjR??k@vB_EfYH|FjBfK??dU|J??`g@`T??pIpDrLdFrE~C??`LzH??fSkM~BuC????t@mBc@{LeCoHmDwG{^kRkSyKyCwCsByCaAcFBkG`DgHfKaTtF_InDeDlJaA`aApa@",
            "mbr":{
               "minx":0,
               "miny":0,
               "maxx":0,
               "maxy":0
            }
         },
         "summary":"||",
         "warnings":"",
         "waypointOrders":[
            5
         ],
         "rpoption":32
      }
   ],
   "status":200,
   "statusMsg":""
}

Last updated

Was this helpful?