Start Route Guidance to Destination
Start Route Guidance to Destination
Usage
You can start route guidance to the destination by launching the Kakao Navigation app using the navigateTo()
function.
It is defined as follows:
export function navigateTo(params: {
destination: KakaoNaviLocation;
option?: KakaoNaviOption;
viaList?: KakaoNaviLocation[];
openWebInstallUrlIfNaviAppNotAvailable?: boolean;
}): Promise<boolean>
destination
: The destination information, which is a required parameter.option
: Options for navigation.viaList
: List of via points.openWebInstallUrlIfNaviAppNotAvailable
: Whether to automatically redirect to the installation screen if Kakao Navigation app is not available. The default value istrue
.
For detailed explanations of the options, refer to the Official Documentation.
Since Navi has a specific option that guides the installation process, if the app execution fails, the Package-KakaoAppNotAvailable
error code will not be rejected as a Promise
.
Instead, you can determine if the app was executed without issues based on the resolved result.
Route guidance is not available on the web platform.
If on a mobile web, the browser will be redirected to the Kakao Navi execution/installation guide screen if the Kakao Navigation app is not available.
For desktop web, nothing will happen.
This is an announcement of the end of support for route guidance on the Kakao Navi web version from Kakao's JavaScript SDK.