Share Route to Destination
Share Route to Destination
Usage
Use shareTo() to launch the Kakao Navigation app and share the route.
It is defined as follows:
export function shareTo(params: {
destination: KakaoNaviLocation;
option?: KakaoNaviOption;
viaList?: KakaoNaviLocation[];
openWebInstallUrlIfNaviAppNotAvailable?: boolean;
}): Promise<boolean>
destination: Required destination information.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.
Because Navi has an option to guide app installation, the Promise does not reject with Package-KakaoAppNotAvailable when the app fails to launch.
Check the resolved result to see whether the app launched successfully.
Route guidance is not available on the web platform.
On mobile web, if the Kakao Navigation app is unavailable, the browser redirects to the Kakao Navi launch/installation guide.
On desktop web, the function returns false without requesting app launch.
On mobile web, true indicates a launch request, not confirmation that Kakao Navi is installed or running. The Kakao JS SDK controls its launch/installation fallback; openWebInstallUrlIfNaviAppNotAvailable applies only to native platforms.
The announcement below describes the end of web route guidance support for Kakao Navi in Kakao's JavaScript SDK.