API DOCUMENTATION

Route

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 : start point, destination, and car type, and waypoint(optional).

get

https://maps.fatos.biz/fatos/api/route?(querystring)

 

Parameter
Required Parameter Description
origin start point(13.729139,100.493947) latitute, longitude
destination end point(13.746328,100.512601) latitute, longitude
key auth key
car vehicle type(small:1,medium:2)

optional parameter Description
via waypoint (latitute,longitude),
In the case of multiple waypoints, list them in order in the query string.
(ex. via=37.5618288,126.8019274&via=36.5618288,127.8019274&…)
car car type (1:compact, 2:standard, 3: full size, 6:economy)
rpoption route options,
Sum of each option value(1:recommendation1 / 2:recommendation2 / 4:highway priority / 8:generalroad priority / 16:shortest distance / 32:free road(shortest time) / 64:exclude caronly / 256:free road(shortest distance) )
- ex) rpoption=3 => recommendation1,recommendation2
angle degrees (0~359)

 

Example
https://maps.fatos.biz/fatos/api/route?key=[YOUR_API_KEY]&origin=37.5597,127.02298&destination=36.1442,128.32546&car=1&via=36.123123,127.123123&angle=100&rpoption=3

 

Return : JSON type
status OK, FAIL
err error message,
only in case of fail.
routes
rpoption route options(1:recommendation1 / 2:recommendation2 / 4:highway priority / 8:generalroad priority / 16:shortest distance / 32:free road(shortest time) / 64:exclude caronly / 256:free road(shortest distance) )
bounds Up and down diagonal vertex coordinates for gripping map mbr.
overview_polyline.points Google polyline coordinate information
points_count points_count point count
points points Display lines on a map using the[mapInstance.geometrydecode(points)]function
legs Detailed information of the route corresponding to the route option, and legs may come in plural according to the route option.(rpoption=3 : recommendation1,recommendation2)
start_location The beginning of the current path
end_location End point of current path
distance Total distance traveled in current path
duration Total time of the current route
via_waypoint Waypoint coordinates information on the current route
- Created only when waypoints are included in request information
steps Repeat section information of current route
instructions Name information of each section
roadcategory Road type of each section
roadname Road name of each section
maneuver Rotation information of each section
distance Movement distance of each section
duration Required time for each section

 

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.