Skip to main content

Destinations

Use NaviHelper APIs to set, check, and cancel a destination. Confirm the results in NaviHelperEventListener callbacks.

Set, check, and cancel a destination

Call requestRoute() to set a destination, getDestinationInfo() to check it, and cancelRoute() to cancel it. To set the destination again, call requestRoute() again.

// Set destination
naviHelper.requestRoute(
RouteInfo(
latitude = 37.48544722,
longitude = 127.03636666,
displayLongitude = null,
displayLatitude = null,
poiName = "42dot",
poiId = "36khp37hh8gqcm5nqhe5",
poiSubId = "0",
address = "서울시 강남구 남부순환로 2621"
)
)

// Check destination
naviHelper.getDestinationInfo()

// Receive data in the onDestinationInfo callback
override fun onDestinationInfo(destinationInfo: DestinationInfo) {
Log.d(logTag, "onDestinationInfo $destinationInfo")
}

// Cancel destination
naviHelper.cancelRoute()

You can monitor the route search process with the following callbacks.

CallbackDescription
onRouteStarted(routeStartInfo)Called when the Navigation app starts a route search.
onRoutingCompleted()Called when the route search is complete.
onDestinationChanged()Called when a destination is set or removed.
onError(errorCode)Called when an error occurs while processing a route request.
note

A successful call to requestRoute() does not mean the route search is complete. Confirm the final result in event callbacks. Information query APIs do not return values directly; process the result in the corresponding event callback.

For route option changes and rerouting, see Routes.