MOGOS Maps
console
  • Overview
  • API & COMPONENT
    • Maps
      • Map Control
        • Sources
        • Bounds
        • Zoom
        • Center
        • Rotate
        • Tilt
        • Flyto
        • Solid
        • Languages
        • Theme
        • Event Once
        • Event On/Off
      • Layer Control
        • Layers
        • Filters
        • Property
        • The specifation of layer style
          • Fill
          • Line
          • Circle
          • Symbol
      • Map UI
      • Map Utilities
        • Rectangle
        • Circle
        • Polyline
        • Polylgon
        • Area
        • Distance
        • Marker
          • Members
    • Search
      • Name
      • Category
      • Address
      • Postal Code
      • Geocoding
    • Route
      • General Vehicles
      • Motorbike
      • Bicycle
      • Pedestrian
      • Truck
      • Public Transportation
    • Logistics & Delivery
      • Route including multiple waypoints
      • Route as optimized order for multiple waypoints
      • Route as optimized order for transportation of logistics
      • Route as optimized order for delivery
      • Predicted route which is certain time in the future
    • Fleet Management
      • Realtime location tracking
      • Moving trajectory analysis
      • Driving road pattern analysis
      • Driver behavior analysis
      • Geofencing
      • Road snap
  • Help
    • Get your API Key
    • Troubleshooting
  • The last versions
    • MOGOS Maps API
      • MOGOS Maps API V1.0
Powered by GitBook

©MOGOS 2023

On this page
  • Request
  • Example
  • Response
  • Example
  1. API & COMPONENT
  2. Route

Public Transportation

The public transportation service searches for buses and subway lines, and when you enter your departure and destination, you search for buses, trains, buses and subway lines. Currently, only Korea provides services, and the region will gradually expand.

Method
Request
Response

GET

https://maps.mogoscorp.com/api/v2/route

json, xml

Request

Parameter (Required)
Description
Remark

key

Your API key.

string

origin

Start location (Longitude, Latitude)

string

destination

Destination location (Longitude, Latitude)

string

rpoption

Path search result sorting method

0: Recommended path

1: sorted by type

e.g. subway, bus, bus+subway,

subway+bus, bus+subway+bus (Default : 0)

int

cartype

Type of vehicle. 251: Public Transportation

int

reqtype

Type of route request.

(Default :0 only)

int

carspeed

Speed of vehicle. (Default :0 Only)

int

angle

Angle of vehicle's direction. (Default : 0 only)

int

unixtime

Time requested for search route

string

gmtoffset

Timezone

string

Parameter (Optional)
Description
Remark

lang

Select Result Language

0: Korean

1: English

2: Japanese

3: Chinese (simplified)

4: Chinese (traditional)

5: Vietnamese (support only in the metropolitan area)

(Default : 0)

output

Output format (json or xml)

(Default : json)

SearchType

Select Intercity or In-City Movement. A search is performed for intra-city movement or intercity movement.

SearchPathType

Specify the route means within the city. 0: All

1: Subway

2: Buses (Default : 0)

Example

// Some code

Response

Parameter
Description
Remark

result

Top node

node

searchType

Result classification (via city or city direct or intercity transfer)

0: In-City,

1: City Direct,

2: City Transfer

int

outTrafficCheck

Intercity "direct" navigation results (Transfer X)

0: False,

1: True

boolean

busCount

Number of bus results

int

subwayCount

Number of subway results

int

subwayBusCount

Number of "Bus + Subway" results

int

pointDistance

Straight distance (meters) between origin (SX, SY) and destination (EX, EY)

double

startRadius

The radius of the originate point

int

endRadius

The radius of the destination point

int

path

Result List Extension Node

node

pathType

Result Type

1: subway,

2: bus,

3: bus+subway

info

Summary Information Extension Node

node

trafficDistance

Total distance traveled except on foot

double

totalWalk

Total walking distance

int

totalTime

Total time required

int

payment

A total charge

int

busTransitCount

Bus transfer count

int

subwayTransitCount

A subway transfer count

int

totalDistance

A total distance

double

subPath

Transportation Information Extension Node

node

trafficType

Types of transportation (walk, bus, subway)

1: subway,

2: bus,

3: walk

int

distance

A travel distance

double

sectionTime

A time to travel

int

stationCount

Number of stops moving to and from (required for subways and buses only)

int

lane

Transportation Information Extension Node

node

name

Name of subway line

(required only for subways)

string

busNo

Bus number (required only for buses)

string

busType

Bus type (required only for buses)

int

busID

Bus code (required only for buses)

int

busLocalBlID

Bus route ID for each region (required only for BIS-provided areas)

string

busCityCode

Transportation company approved city code (required only for buses)

int

busProviderCode

BIS code (required only for BIS delivery areas)

int

subwayCode

Subway line number (required only for subways)

int

subwayCityCode

Subway city code (required only for subways)

int

startName

A stop or station name

string

startX

Boarding stop or station location Longitude

double

startY

Boarding stop or station location Latitude

double

endName

A stop or station name

string

endX

Leaving stop or station location Longitude

double

endY

Leaving stop or station location Latitude

double

way

Directional information (required only for subways)

string

wayCode

Directional information code (required only for the first route of the subway)

1: up

2: down

int

door

Rapid subway transfer location (required only for subways)

string

startID

Departure stop or station code

int

startStationCityCode

Departure stop city code (required only for buses)

startStationProviderCode

Departure stop BIS code (required only for BIS-provided areas)

int

startLocalStationID

Departure stop ID for each region (required only for BIS-provided areas)

string

startArsID

Unique number of each local departure stop (required only for BIS-provided areas)

string

endID

Arrival stop or station code

int

endStationCityCode

Arrival stop city code (required only for buses)

int

endStationProviderCode

Arrival stop BIS code

(required only for BIS-provided areas)

int

endLocalStationID

Arrival stop ID for each region

(required only for BIS-provided areas)

string

endArsID

Unique number of each local arrival stop (required only for BIS-provided areas)

string

startExitNo

subway exit number (Used only for subways, but may not have that tag.)

string

startExitX

Exit X coordinates for subway entry

(only used for subways but may not have the corresponding tag)

double

startExitY

Exit Y coordinates for subway

(only used for subway but may not have the corresponding tag)

double

endExitNo

Exit number of the subway

(only used for subways but may not have the corresponding tag)

string

endExitX

Exit X coordinates of subway exit (only used for subway but may not have the corresponding tag)

double

endExitY

Exit Y coordinates of subway exit (only used for subway but may not have the corresponding tag)

double

passStopList

Route Detail Section Information Extension Node (available in Korean only)

node

stations

Stop Information Group Node

node

index

The order of stops

int

stationID

Station ID

int

stationName

Station Name

int

stationCityCode

Stop city code (required only for buses)

int

stationProviderCode

BIS code

(required only for BIS delivery areas)

int

localStationID

Local stop ID

(required only for BIS-provided areas)

string

arsID

Unique number of each local stop

(required only for BIS-provided areas)

string

x

Station location Longitude

string

y

Station location Latitude

string

isNonStop

Unstalled stop Y/N (required only for buses)

string

Example

{
	"result": {
		"searchType": 0,
		"outTrafficCheck": 0,
		"busCount": 7,
		"subwayCount": 1,
		"subwayBusCount": 5,
		"pointDistance": 24046,
		"startRadius": 700,
		"endRadius": 700,
		"path": [
			{
				"pathType": 3,
				"info": {
					"trafficDistance": 29882,
					"totalWalk": 1316,
					"totalTime": 89,
					"payment": 1650,
					"busTransitCount": 1,
					"subwayTransitCount": 1,
					"mapObj": "1123:1:43:52@11:2:137:116",
					"firstStartStation": "구로디지털단지역",
					"lastEndStation": "방학",
					"totalStationCount": 31,
					"busStationCount": 9,
					"subwayStationCount": 22,
					"totalDistance": 31198,
					"totalWalkTime": -1
				},
				"subPath": [
					{
						"trafficType": 3,
						"distance": 592,
						"sectionTime": 9
					},
					{
						"trafficType": 2,
						"distance": 4082,
						"sectionTime": 17,
						"stationCount": 9,
						"lane": [
							{
								"busNo": "5531",
								"type": 12,
								"busID": 1123,
								"busLocalBlID": "100100265",
								"busCityCode": 1000,
								"busProviderCode": 4
							}
						],
						"startName": "구로디지털단지역",
						"startX": 126.90256,
						"startY": 37.484078,
						"endName": "대방역",
						"endX": 126.92635,
						"endY": 37.512554,
						"startID": 126473,
						"startStationCityCode": 1000,
						"startStationProviderCode": 4,
						"startLocalStationID": "120000001",
						"startArsID": "21-001",
						"endID": 103278,
						"endStationCityCode": 1000,
						"endStationProviderCode": 4,
						"endLocalStationID": "119000022",
						"endArsID": "20-108",
						"passStopList": {
							"stations": [
								{
									"index": 0,
									"stationID": 126473,
									"stationName": "구로디지털단지역",
									"stationCityCode": 1000,
									"stationProviderCode": 4,
									"localStationID": "120000001",
									"arsID": "21-001",
									"x": "126.90256",
									"y": "37.484078",
									"isNonStop": "N"
								},
								{
									"index": 1,
									"stationID": 126478,
									"stationName": "동작상떼빌아파트",
									"stationCityCode": 1000,
									"stationProviderCode": 4,
									"localStationID": "119000001",
									"arsID": "20-001",
									"x": "126.904537",
									"y": "37.486503",
									"isNonStop": "N"
								}
							]
						}
					}
				]
			}
		]
	}
}

PreviousTruckNextLogistics & Delivery

Last updated 2 years ago

The MOGOS Maps API requires an API Key, which can be obtained from the website or contact .

MOGOS Console
sales@mogoscorp.com