This document describes how to integrate the Kakao Navi API into your service with the Kakao SDK for JavaScript (hereinafter referred to as 'JavaScript SDK').
The JavaScript SDK allows users to start navigation or share location via the Kakao Navi application (hereinafter referred to as 'app'). If the Kakao Navi app is not installed on a user's device, the download page for the Kakao Navi app is open.
You can test the features described in this document in [Tools] > [JS SDK demo] menu.
Import the JavaScript SDK into your web page and initialize it by referring to Getting Started > JavaScript.
Permission | Prerequisite | Kakao Login | User consent |
---|---|---|---|
- | Register platforms | - | - |
The Navigation API starts directions from a user's current location to the entered destination. To implement this function, call Kakao.Navi.start()
function. You can simply enter the X and Y coordinates of the destination or use optional parameters to set search criteria, such as a specific vehicle type or exclusive routes.
If the request is successful, the Kakao Navi app is launched to get directions to the specified destination. If the Kakao Navi app is not installed on a user's device, the user should be directed to the download page for the Kakao Navi app.
In JavaScript SDK 1.41.0 or higher, Kakao Navi does not support its web version that is started on a device where the Kakao Navi app is not installed. Thus, implement to open the download page for Kakao Navi if Kakao Navi is not installed. For more information, refer to Notice.
Name | Type | Description | Required |
---|---|---|---|
name | String |
Location name. | O |
x | Number |
X coordinate of the destination (Longitude) in the wgs84 or katec coordinate system. |
O |
y | Number |
Y coordinate of the destination (Latitude) in the wgs84 or katec coordinate system. |
O |
coordType | String |
Coordinate system to use. wgs84 or katec wgs84 : World Geodetic System 84 coordinate systemkatec : Katec coordinate system |
X |
vehicleType | Number |
Vehicle type. 1: Class 1 (Passenger car, small van, small truck) 2: Class 2 (Mid-size van, mid-size truck.) 3: Class 3 (Large van, 2-axis large truck) 4: Class 4 (3-axis large truck) 5: Class 5 (Special truck with four axes or more) 6: Class 6 (Compact car) 7: Class 7 (Motorcycle) (Default: Vehicle type the user set on the Kakao Navi app) |
X |
rpOption | Number |
Route option. 1: Fastest route. 2: Toll-free route. 3: Shortest route. 4: Route excluding motorway. 5: Main road first. 6: Highway first. 8: Normal road first. 100: Recommended route. |
X |
routeInfo | Boolean |
Whether to view entire route information to the destination. | X |
sX | Number |
X coordinate of the starting point. NOTE: This value is only used for a reference to get directions. For navigation, the current position is used as a starting point regardless of the designated starting point. |
X |
sY | Number |
Y coordinate of the starting point. NOTE: This value is only used for a reference to get directions. For navigation, the current position is used as a starting point regardless of the designated starting point. |
X |
sAngle | Number |
Angle of the vehicle at starting point. A value between 0 and 359. NOTE: This value is only used for a reference to get directions. For navigation, the current position is used as a starting point regardless of the designated starting point. |
X |
returnUri | String |
URI to be redirected when stopping navigation (viewing entire routes). | X |
viaPoints | Object[] |
Used to add a stop. Up to 3 stops are allowed. |
X |
Kakao.Navi.start({
name: 'Hyundai Department Store PanGyo',
x: 127.11205203011632,
y: 37.39279717586919,
coordType: 'wgs84',
});
Permission | Prerequisite | Kakao Login | User consent |
---|---|---|---|
- | Register platforms | - | - |
The Sharing location API provides a screen to share the destination specified on the Kakao Navi app. To implement this function, call the Kakao.Navi.share()
function by passing the X and Y coordinates of the location as a parameter.
If the request is successful, the Kakao Navi app is launched and shows the shared location. If the Kakao Navi app is not installed on a user's device, the user should be directed to the download page for the Kakao Navi app.
Name | Type | Description | Required |
---|---|---|---|
name | String |
Location name. | O |
x | Number |
X coordinate of the destination (Longitude) in the wgs84 or katec coordinate system. |
O |
y | Number |
Y coordinate of the destination (Latitude) in the wgs84 or katec coordinate system. |
O |
coordType | String |
Coordinate system to use. wgs84 (World Geodetic System 84 coordinate system) or katec (Katec coordinate system) |
X |
Kakao.Navi.share({
name: 'Hyundai Department Store PanGyo',
x: 127.11205203011632,
y: 37.39279717586919,
coordType: 'wgs84',
});