INVMapViewDelegate
Objective-C
@protocol INVMapViewDelegate <NSObject>
Swift
protocol INVMapViewDelegate : NSObjectProtocol
InaviMapView의 비동기 작업 및 속성 변화의 결과를 알려주는 함수가 정의된 프로토콜.
-
지도 인증 과정에서 커스텀 지도 스타일을 로드할 때 호출되는 콜백 메서드.
콜백 메서드로 전달되는 커스텀 지도 스타일 리스트 중에서 지도에 설정할 커스텀 지도 스타일을 반환하면 됩니다.Declaration
Objective-C
- (nullable INVMapStyle *)mapView:(nonnull InaviMapView *)mapView willLoadInitialCustomMapStyleInCustomMapStyles: (nonnull NSArray<INVMapStyle *> *)customMapStyles;Swift
optional func mapView(_ mapView: InaviMapView, willLoadInitialCustomMapStyleInCustomMapStyles customMapStyles: [INVMapStyle]) -> INVMapStyle?Parameters
mapView지도 인증 과정에서 커스텀 지도 스타일을 로드할
InaviMapView객체.customMapStyles커스텀 지도 스타일 리스트.
Return Value
설정할 커스텀 지도 스타일.
null을 반환하면 기본 지도 스타일이 적용됩니다.
-
지도가 표시하는 영역이 변경될 때 호출되는 콜백 메서드.
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
- (BOOL)didDoubleTapMapView:(CGPoint)point LatLng:(nonnull INVLatLng *)latlng;Swift
optional func didDoubleTapMapView(_ point: CGPoint, latLng latlng: INVLatLng) -> BoolParameters
point더블 탭한 화면 좌표.
latlng더블 탭한 위경도 좌표.
Return Value
YES일 경우 이벤트를 소비합니다. 그렇지 않을 경우InaviMapView까지 이벤트가 전달됩니다.
-
위치 추적 모드가 변경되었을 때 호출되는 콜백 메서드.
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업데이트 된 위치
-
실내지도 정보가 변경되었을 때 호출되는 콜백 메서드.
Declaration
Objective-C
- (void)mapView:(nonnull InaviMapView *)mapView didChangeIndoor:(nullable NSNumber *)placeId floors:(nullable NSArray<INVFloor *> *)floors floor:(nullable INVFloor *)floor;Swift
optional func mapView(_ mapView: InaviMapView, didChangeIndoor placeId: NSNumber?, floors: [INVFloor]?, floor: INVFloor?)Parameters
mapView실내지도 정보가 변경된
InaviMapView객체.placeId현재 실내지도 장소 ID.
nil일 경우 실내지도가 표시되지 않음.floors현재 장소의 층 목록.
nil일 경우 층 정보가 없음.floor현재 선택된 층.
nil일 경우 선택된 층이 없음.
INVMapViewDelegate Protocol Reference