InaviMapView

Objective-C


@interface InaviMapView : UIView

Swift

class InaviMapView : UIView

아이나비 지도를 정의하는 뷰 클래스.
해당 클래스를 서브 뷰로 추가하여 지도를 표출할 수 있습니다.

Creating Instances

  • 지정된 프레임 크기로 지도 뷰의 인스턴스를 생성합니다.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame;

    Swift

    init(frame: CGRect)

    Parameters

    frame

    사용자 지정 프레임 크기.

    Return Value

    InaviMapView 인스턴스.

  • 지정된 프레임 크기와 지도의 기본 옵션을 지정하여 지도 뷰의 인스턴스를 생성합니다.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame
                                  options:(nonnull INVMapOptions *)options;

    Swift

    init(frame: CGRect, options: INVMapOptions)

    Parameters

    frame

    사용자 지정 프레임 크기.

    options

    지도의 기본 옵션.

    Return Value

    InaviMapView 인스턴스.

  • 지정된 프레임 크기, 기본 옵션과 Delegate를 지정하여 지도 뷰의 인스턴스를 생성합니다.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame
                                  options:(nullable INVMapOptions *)options
                                 delegate:(nonnull id<INVMapViewDelegate>)delegate;

    Swift

    init(frame: CGRect, options: INVMapOptions?, delegate: INVMapViewDelegate)

    Parameters

    frame

    사용자 지정 프레임 크기.

    options

    지도의 기본 옵션.

    delegate

    InaviMapView의 Delegate.

    Return Value

    InaviMapView 인스턴스.

Accessing the Delegate

  • InaviMapView의 Delegate.

    지도 뷰의 Delegate를 이용해 지도의 표출이나, 화면 갱신 여부 등의 메시지를 전달합니다.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<INVMapViewDelegate> delegate;

    Swift

    @IBOutlet weak var delegate: INVMapViewDelegate? { get set }

Configuring the Map’s Appearance

  • 지도의 최소 줌 레벨.

    기본값은 1입니다.

    Declaration

    Objective-C

    @property (nonatomic) double minimumZoomLevel;

    Swift

    var minimumZoomLevel: Double { get set }
  • 지도의 최대 줌 레벨.

    기본값은 20입니다.

    Declaration

    Objective-C

    @property (nonatomic) double maximumZoomLevel;

    Swift

    var maximumZoomLevel: Double { get set }
  • 지도의 최소 기울기 각도. (도 단위)

    기본값은 0입니다.

    Declaration

    Objective-C

    @property (nonatomic) double minimumTilt;

    Swift

    var minimumTilt: Double { get set }
  • 지도의 최대 기울기 각도. (도 단위)

    기본값은 60입니다.

    Declaration

    Objective-C

    @property (nonatomic) double maximumTilt;

    Swift

    var maximumTilt: Double { get set }
  • 지도 심벌의 크기. (배율 단위) 0.0 ~ 2.0 값을 지원하며 1.5으로 설정하면 지도 심벌이 1.5배의 크기로 표출됩니다.

    기본값은 1.0입니다.

    Declaration

    Objective-C

    @property (nonatomic) double symbolScale;

    Swift

    var symbolScale: Double { get set }
  • 지도 이동을 제한하는 INVLatLngBounds 영역.

    nil로 설정할 경우 제한이 해제됩니다.

    Declaration

    Objective-C

    @property (nonatomic, nullable) INVLatLngBounds *constraintBounds;

    Swift

    var constraintBounds: INVLatLngBounds? { get set }
  • 지도 영역 중심에 대한 카메라 위치.

    Declaration

    Objective-C

    @property (nonatomic) INVCameraPosition *_Nonnull cameraPosition;

    Swift

    var cameraPosition: INVCameraPosition { get set }
  • 이 지도에 대한 INVProjection 객체.

    Declaration

    Objective-C

    @property (nonatomic, readonly) INVProjection *_Nonnull projection;

    Swift

    var projection: INVProjection { get }
  • 지도의 패딩. 패딩에 해당하는 부분은 지도의 콘텐츠 영역에서 제외됩니다.

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets contentInset;

    Swift

    var contentInset: UIEdgeInsets { get set }
  • 지도 영역에 대한 INVLatLngBounds.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) INVLatLngBounds *_Nonnull contentBounds;

    Swift

    @NSCopying var contentBounds: INVLatLngBounds { get }
  • 축척 바 표출 여부.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showScaleBar;

    Swift

    var showScaleBar: Bool { get set }
  • 나침반 표출 여부.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showCompass;

    Swift

    var showCompass: Bool { get set }
  • 줌 컨트롤 표출 여부.

    기본값은 NO입니다.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showZoomControl;

    Swift

    var showZoomControl: Bool { get set }
  • 현위치 버튼 표출 여부.

    기본값은 NO입니다.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showLocationButton;

    Swift

    var showLocationButton: Bool { get set }
  • 로고의 위치.

    기본값은 INVPositionBottomLeft입니다.

    Declaration

    Objective-C

    @property (nonatomic) INVPosition logoViewPosition;

    Swift

    var logoViewPosition: INVPosition { get set }
  • 로고의 마진 (pt 단위).

    기본값은 (8, 8)입니다.

    Declaration

    Objective-C

    @property (nonatomic) CGPoint logoViewMargins;

    Swift

    var logoViewMargins: CGPoint { get set }
  • 지도에 적용할 커스텀 지도 스타일.

    적용하려는 지도 스타일이 INVMapSdk.savedCustomMapStyles에 존재하지 않거나 nil로 설정할 경우 기본 지도 스타일이 적용됩니다.

    커스텀 스타일 적용 시 건물 3D 효과, 셰이프 전역 Z 인덱스, 지도 심볼 Scale 기능은 제한적으로 지원되거나 지원되지 않습니다. 추후 업데이트를 통해 지원될 예정입니다.

    기본값은 nil입니다.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) INVMapStyle *customMapStyle;

    Swift

    var customMapStyle: INVMapStyle? { get set }
  • 지도의 유형.

    기본값은 INVMapTypeNormal입니다.

    Declaration

    Objective-C

    @property (nonatomic) INVMapType mapType;

    Swift

    var mapType: INVMapType { get set }

Displaying the User’s Location

Configuring How the User Interacts with the Map

  • 지도 줌 제스처 사용 여부를 나타내는 속성.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isZoomGesturesEnabled) BOOL zoomGesturesEnabled;

    Swift

    var isZoomGesturesEnabled: Bool { get set }
  • 지도 스크롤 제스처 사용 여부를 나타내는 속성.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isScrollGesturesEnabled) BOOL scrollGesturesEnabled;

    Swift

    var isScrollGesturesEnabled: Bool { get set }
  • 지도 회전 제스처 사용 여부를 나타내는 속성.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isRotateGesturesEnabled) BOOL rotateGesturesEnabled;

    Swift

    var isRotateGesturesEnabled: Bool { get set }
  • 지도 기울기 제스처 사용 여부를 나타내는 속성.

    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isTiltGesturesEnabled) BOOL tiltGesturesEnabled;

    Swift

    var isTiltGesturesEnabled: Bool { get set }
  • 줌 또는 회전 제스처 시 기준점을 지도 중심으로 할지 여부를 나타내는 속성.

    값이 YES이면 지도 중심을 기준으로, NO이면 제스처 하는 위치를 기준으로 줌 또는 회전이 됩니다.
    기본값은 NO 입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isFocalPointCenter) BOOL focalPointCenter;

    Swift

    var isFocalPointCenter: Bool { get set }
  • 로고 클릭 시 SDK 정보 팝업 표출 여부를 나타내는 속성.

    비활성화 시 별도의 페이지에 아이나비 지도 SDK의 오픈 소스 라이선스와 법적 고지를 제공해야 합니다.
    기본값은 YES입니다.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isLogoClickEnabled) BOOL logoClickEnabled;

    Swift

    var isLogoClickEnabled: Bool { get set }
  • 지도 애니메이션 마찰 계수 입니다. 값의 범위는 0~1이며, 계수가 클수록 마찰이 강해집니다.

    기본값은 UIScrollViewDecelerationRateNormal입니다.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat decelerationRate;

    Swift

    var decelerationRate: CGFloat { get set }

Manipulating the Viewpoint