INVMapViewDelegate

@protocol INVMapViewDelegate <NSObject>

InaviMapView의 비동기 작업 및 속성 변화의 결과를 알려주는 함수가 정의된 프로토콜.

  • 지도가 표시하는 영역이 변경될 때 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapView:(nonnull InaviMapView *)mapView
        regionWillChangeAnimated:(BOOL)animated
                          reason:(NSInteger)reason;

    Swift

    optional func mapView(_ mapView: InaviMapView, regionWillChangeAnimated animated: Bool, reason: Int)

    Parameters

    mapView

    영역이 변경될 InaviMapView 객체.

    animated

    애니메이션 효과가 적용돼 움직일 경우 YES, 그렇지 않을 경우 NO.

    reason

    카메라 변경 이유.

  • 지도가 표시하고 있는 영역이 변경되고 있을 때 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapView:(nonnull InaviMapView *)mapView
        regionIsChangingWithReason:(NSInteger)reason;

    Swift

    optional func mapView(_ mapView: InaviMapView, regionIsChangingWithReason reason: Int)

    Parameters

    mapView

    영역이 변경되고 있는 InaviMapView 객체.

    reason

    카메라 변경 이유.

  • 지도가 표시하고 있는 영역이 변경되었을 때 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapView:(nonnull InaviMapView *)mapView
        regionDidChangeAnimated:(BOOL)animated
                         reason:(NSInteger)reason;

    Swift

    optional func mapView(_ mapView: InaviMapView, regionDidChangeAnimated animated: Bool, reason: Int)

    Parameters

    mapView

    영역이 변경된 INaviMapView 객체.

    animated

    애니메이션 효과가 적용돼 움직인 경우 YES, 그렇지 않은 경우 NO.

    reason

    카메라 변경 이유.

  • 지도가 표시하고 있는 영역이 변경된 후 진행 중인 터치 이벤트가 없을 때 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapViewDidBecomeIdle:(nonnull InaviMapView *)mapView;

    Swift

    optional func mapViewDidBecomeIdle(_ mapView: InaviMapView)

    Parameters

    mapView

    영역이 변경된 INaviMapView 객체.

  • 사용자가 지도를 탭하면 호출됩니다.

    Declaration

    Objective-C

    - (void)didTapMapView:(CGPoint)point LatLng:(nonnull INVLatLng *)latlng;

    Swift

    optional func didTapMapView(_ point: CGPoint, latLng latlng: INVLatLng)

    Parameters

    point

    탭한 화면 좌표.

    latlng

    탭한 위경도 좌표.

  • 사용자가 지도를 더블 탭하면 호출됩니다.

    Declaration

    Objective-C

    - (BOOL)didDoubleTapMapView:(CGPoint)point LatLng:(nonnull INVLatLng *)latlng;

    Swift

    optional func didDoubleTapMapView(_ point: CGPoint, latLng latlng: INVLatLng) -> Bool

    Parameters

    point

    더블 탭한 화면 좌표.

    latlng

    더블 탭한 위경도 좌표.

    Return Value

    YES일 경우 이벤트를 소비합니다. 그렇지 않을 경우 InaviMapView까지 이벤트가 전달됩니다.

  • 사용자가 지도를 롱 탭하면 호출됩니다.

    Declaration

    Objective-C

    - (void)didLongTapMapView:(CGPoint)point LatLng:(nonnull INVLatLng *)latlng;

    Swift

    optional func didLongTapMapView(_ point: CGPoint, latLng latlng: INVLatLng)

    Parameters

    point

    롱 탭한 화면 좌표.

    latlng

    롱 탭한 위경도 좌표.

  • 위치 추적 모드가 변경될 때 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapView:(nonnull InaviMapView *)mapView
        didChangeUserTrackingMode:(INVUserTrackingMode)mode
                         animated:(BOOL)animated;

    Swift

    optional func mapView(_ mapView: InaviMapView, didChange mode: INVUserTrackingMode, animated: Bool)

    Parameters

    mapView

    위치 추적 모드가 적용된 InaviMapView 객체.

    mode

    위치 추적 모드.

    animated

    애니메이션 효과가 적용돼 움직인 경우 YES, 그렇지 않은 경우 NO.

  • 위치가 업데이트 되면 호출되는 콜백 메서드.

    Declaration

    Objective-C

    - (void)mapView:(nonnull InaviMapView *)mapView
        didUpdateUserLocation:(nullable CLLocation *)userLocation;

    Swift

    optional func mapView(_ mapView: InaviMapView, didUpdateUserLocation userLocation: CLLocation?)

    Parameters

    mapView

    위치 추적 모드가 적용된 InaviMapView 객체.

    userLocation

    업데이트 된 위치