KNMapUserLocationEventListener
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 the user location, such as single taps and double taps, and animation completion events.
Example code — KNMapUserLocationEventListener
kotlin
interface KNMapUserLocationEventListenerMethods
onSingleTapped
Called when the user location is tapped once. Returns the selected user-location information.
kotlin
abstract fun onSingleTapped( mapView: KNMapView?,
userLocation: KNMapUserLocation? )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNMapUserLocation registered |
userLocation | Selected vehicle icon |
onDoubleTapped
Called when the user location is double-tapped. Returns the selected user-location information.
kotlin
abstract fun onDoubleTapped( mapView: KNMapView?,
userLocation: KNMapUserLocation? )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNMapUserLocation registered |
userLocation | Selected vehicle icon |
onLongPressed
Called when the user location is pressed and held. Returns the selected user-location information.
kotlin
abstract fun onLongPressed( mapView: KNMapView?,
userLocation: KNMapUserLocation? )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNMapUserLocation registered |
userLocation | Selected vehicle icon |
userLocationAnimationEnded
Called when the user-location animation on the map ends.
kotlin
abstract fun userLocationAnimationEnded( mapView: KNMapView?,
userLocation: KNMapUserLocation? )Parameters
| Name | Description |
|---|---|
mapView | Map view with KNMapUserLocation registered |
userLocation | Selected vehicle icon |