KNMapRouteEventListener
INFO
This English reference is based on Directions SDK 1.12.8-hotfix02. For the latest version, see the Korean reference.
Receives touch events for routes, such as single taps and double taps. Implement KNMapRouteEventListener and register it with KNMapView.routeProperties.
Example code — KNMapRouteEventListener
kotlin
interface KNMapRouteEventListenerMethods
onSingleTapped
Called when a route is tapped once. Returns the selected route information.
kotlin
abstract fun onSingleTapped( mapView: KNMapView?,
route: KNRoute,
index: Int )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNRoute registered |
route | selected route |
index | index of the selected route in the list of routes registered on the map |
onDoubleTapped
Called when a route is double-tapped. Returns the selected route information.
kotlin
abstract fun onDoubleTapped( mapView: KNMapView?,
route: KNRoute,
index: Int )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNRoute registered |
route | selected route |
index | index of the selected route in the list of routes registered on the map |
onLongPressed
Called when a route is pressed and held. Returns the selected route information.
kotlin
abstract fun onLongPressed( mapView: KNMapView?,
route: KNRoute,
index: Int )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNRoute registered |
route | selected route |
index | index of the selected route in the list of routes registered on the map |