KNMapViewEventListener
INFO
This English reference is based on Directions SDK 1.12.12. For the latest version, see the Korean reference.
Receives Camera gesture events (panning, Zoom, Tilt, and rotation) and screen touch events (single-tap and double-tap). Implement KNMapViewEventListener and register it with KNMapView.
@interface MyMapViewEventListener () <KNMapViewEventListener>
@end
@implementation MyMapViewEventListener
- (void)mapView:(KNMapView * _Nonnull)aMapView singleTappedWithScreenPoint:(CGPoint)aScreenPoint coordinate:(FloatPoint)aCoordinate {
...
}
@end
mapView.viewEventListener = myMapViewEventListner;Methods
mapView:singleTappedWitScreenPoint:coordinate
Called when the map is tapped once. Returns the tapped screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
singleTappedWitScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aCoordinate | KATEC coordinates where the touch event occurred |
mapView:doubleTappedWithScreenPoint:coordinate
Called when the map is double-tapped. Returns the last tapped screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
doubleTappedWithScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Last Screen coordinates where the touch event occurred |
aCoordinate | Last KATEC coordinates where the touch event occurred |
mapView:longPressedWithScreenPoint:coordinate
Called when the map is long-pressed. Returns the pressed screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
longPressedWithScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aCoordinate | KATEC coordinates where the touch event occurred |
mapView:panningStartedWitScreenPoint:coordinate
Called when a panning gesture starts. Returns the initial screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
panningStartedWitScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aCoordinate | KATEC coordinates where the touch event occurred |
mapView:panningChangingWithScreenPoint:coordinate
Called while a panning gesture is in progress. Returns the changing screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
panningChangingWithScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates of the changing position |
aCoordinate | KATEC coordinates of the changing position |
mapView:panningEndedWithScreenPoint:coordinate
Called when a panning gesture ends. Returns the final screen point and KATEC coordinates.
- (void) mapView: (KNMapView*) aMapView
panningEndedWithScreenPoint: (CGPoint) aScreenPoint
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates when the event ends |
aCoordinate | KATEC coordinates at the end of the event |
mapView:zoomingStartedWithScreenPoint:zoom
Called when a pinch Zoom gesture starts. Returns the initial screen point and Zoom level.
- (void) mapView: (KNMapView*) aMapView
zoomingStartedWithScreenPoint: (CGPoint) aScreenPoint
zoom: (float) aZoom;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aZoom | Current zoom level of the map |
mapView:zoomingChangingWithScreenPoint:zoom
Called while a pinch Zoom gesture is in progress. Returns the changing screen point and Zoom level.
- (void) mapView: (KNMapView*) aMapView
zoomingChangingWithScreenPoint: (CGPoint) aScreenPoint
zoom: (float) aZoom;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates according to screen shrinkage/expansion |
aZoom | Current zoom level of the map |
mapView:zoomingEndedWithScreenPoint:zoom
Called when a pinch Zoom gesture ends. Returns the final screen point and Zoom level.
- (void) mapView: (KNMapView*) aMapView
zoomingEndedWithScreenPoint: (CGPoint) aScreenPoint
zoom: (float) aZoom;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates when the event ends |
aZoom | Current zoom level of the map |
mapView:bearingStartedWitScreenPoint:bearing
Called when a rotation gesture starts. Returns the initial screen point and rotation angle.
- (void) mapView: (KNMapView*) aMapView
bearingStartedWitScreenPoint: (CGPoint) aScreenPoint
bearing: (float) aBearing;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aBearing | Current rotation angle of the map |
mapView:bearingChangingWitScreenPoint:bearing
Called while a rotation gesture is in progress. Returns the screen point and changing rotation angle.
- (void) mapView: (KNMapView*) aMapView
bearingChangingWitScreenPoint: (CGPoint) aScreenPoint
bearing: (float) aBearing;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates according to the rotation of the screen |
aBearing | Current rotation angle of the map |
mapView:bearingEndedWitScreenPoint:bearing
Called when a rotation gesture ends. Returns the final screen point and rotation angle.
- (void) mapView: (KNMapView*) aMapView
bearingEndedWitScreenPoint: (CGPoint) aScreenPoint
bearing: (float) aBearing;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates when the event ends |
aBearing | Current rotation angle of the map |
mapView:tiltingStartedWitScreenPoint:tilt
Called when a Tilt gesture starts. Returns the initial screen point and Tilt.
- (void) mapView: (KNMapView*) aMapView
tiltingStartedWitScreenPoint: (CGPoint) aScreenPoint
tilt: (float) aTilt;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates where the touch event occurred |
aTilt | Current tilt of the map |
mapView:tiltingChangingWitScreenPoint:tilt
Called while a Tilt gesture is in progress. Returns the screen point and changing Tilt.
- (void) mapView: (KNMapView*) aMapView
tiltingChangingWitScreenPoint: (CGPoint) aScreenPoint
tilt: (float) aTilt;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Tilt by screen coordinates |
aTilt | Current tilt of the map |
mapView:tiltingEndedWithScreenPoint:tilt
Called when a Tilt gesture ends. Returns the final screen point and Tilt.
- (void) mapView: (KNMapView*) aMapView
tiltingEndedWithScreenPoint: (CGPoint) aScreenPoint
tilt: (float) aTilt;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the touch event occurred |
aScreenPoint | Screen coordinates when the event ends |
aTilt | Current tilt of the map |
mapView:cameraAnimationCanceledWithCameraUpdate
Called when a Camera animation started by moveAnimateCamera is canceled.
- (void) mapView: (KNMapView*) aMapView
cameraAnimationCanceledWithCameraUpdate: (KNMapCameraUpdate*) aCameraUpdate;Parameters
| Name | Description |
|---|---|
aMapView | Map view of the camera event |
aCameraUpdate | The camera information. |
mapView:cameraAnimationEndedWithCameraUpdate
Called when a Camera animation started by moveAnimateCamera finishes.
- (void) mapView: (KNMapView*) aMapView
cameraAnimationEndedWithCameraUpdate: (KNMapCameraUpdate*) aCameraUpdate;Parameters
| Name | Description |
|---|---|
aMapView | Map view of the camera event |
aCameraUpdate | The camera information. |
userLocationAnimationEnded: (Deprecated)
Called when the user-location animation on the map ends.
- (void) userLocationAnimationEnded: (KNMapView *_Nonnull) aMapView;Parameters
| Name | Description |
|---|---|
aMapView | Map view where the user's location is registered |
mapView:onRouteSelected:index: (Deprecated)
Called when a route displayed on the map is selected. Returns the selected route and its index.
- (void) mapView: (KNMapView *_Nonnull) aMapView
onRouteSelected: (KNRoute*_Nonnull) aRoute
index: (int) aIndex;Parameters
| Name | Description |
|---|---|
aMapView | Map view registered by KNRoute |
aRoute | selected route |
aIndex | Index of the selected route in the list of routes registered on the map |
mapView:onPOISelected:poiName:coordinate: (Deprecated)
Called when a POI displayed on the map is selected. Returns the selected POI ID, name, and location in KATEC coordinates.
- (void) mapView: (KNMapView *_Nonnull) aMapView
onPOISelected: (SInt64) aPOIId
poiName: (NSArray* _Nullable) aPOIName
coordinate: (FloatPoint) aCoordinate;Parameters
| Name | Description |
|---|---|
aMapView | Map view registered by KNRoute |
aPOIId | Selected points of interest(POI)of ID |
aPOIName | Selected points of interest(POI)Information on the name |
aCoordinate | KATEC coordinates of the selected POI |