페이지 이동경로
  • Docs>
  • Kakao Navi>
  • JavaScript

Kakao Navi

JavaScript

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') or a web browser. If the Kakao Navi app has been installed on a user's device, the app is launched. If not, the web version of Kakao Navi is opened.

You can test the features described in this document in [Tools] > [JS SDK demo] menu.

IMPORTANT

To use the JavaScript SDK, you must register the Web platform in advance. Go to [My Application] > [Platform] and register your site domains.

Navigation

The Navigation API starts directions from a user's current location to the entered destination. To implement this function, call Kakao.Navi.start. 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 or web version of Kakao Navi is launched to get directions to the specified destination.

Request

Kakao.Navi.start(PARAMETER);

Parameter

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 system
katec: 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)
X
rpOption Number Rout 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. X
sY Number Y coordinate of the starting point. X
sAngle Number Angle of the vehicle at starting point.
A value between 0 and 359.
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

Sample

Kakao.Navi.start({
    name: "현대백화점 판교점",
    x: 127.11205203011632,
    y: 37.39279717586919,
    coordType: 'wgs84'
});

Share location

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 by passing the X and Y coordinates of the location as a parameter.

If the request is successful, the Kakao Navi app or web version of Kakao Navi is launched and shows the shared location.

Request

Kakao.Navi.share(PARAMETER);

Parameter

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

Sample

Kakao.Navi.share({
    name: "현대백화점 판교점",
    x: 127.11205203011632,
    y: 37.39279717586919,
    coordType: 'wgs84'
});

See more