INVProjection


@interface INVProjection : NSObject

단말 화면 상의 좌표와 지도 상의 좌표 간 변환을 담당하는 클래스.

  • 단말 화면 상의 좌표를 지도 상의 좌표(위도, 경도)로 변환합니다.

    Declaration

    Objective-C

    - (nonnull INVLatLng *)latlngFromPoint:(CGPoint)point;

    Swift

    func latlng(from point: CGPoint) -> INVLatLng

    Parameters

    point

    화면 좌표.

    Return Value

    INVLatLng 객체.

  • 지도 상의 좌표를 단말 화면 상의 좌표(x, y)로 변환합니다.

    Declaration

    Objective-C

    - (CGPoint)pointFromLatLng:(nonnull INVLatLng *)coord;

    Swift

    func point(from coord: INVLatLng) -> CGPoint

    Parameters

    coord

    위경도 좌표.

    Return Value

    화면 좌표. coord가 유효하지 않으면 CGPointZero 좌표가 반환됩니다.

  • 단말 화면 상의 영역을 위경도 영역으로 변환합니다.

    Declaration

    Objective-C

    - (nonnull INVLatLngBounds *)latlngBoundsFromViewBounds:(CGRect)viewBounds;

    Swift

    func latlngBounds(fromViewBounds viewBounds: CGRect) -> INVLatLngBounds

    Parameters

    viewBounds

    화면 영역.

    Return Value

    위경도 영역.

  • 위경도 영역을 단말 화면 상의 영역으로 변환합니다.

    Declaration

    Objective-C

    - (CGRect)viewBoundsFromLatLngBounds:(nonnull INVLatLngBounds *)latlngBounds;

    Swift

    func viewBounds(from latlngBounds: INVLatLngBounds) -> CGRect

    Parameters

    latlngBounds

    위경도 영역.

    Return Value

    화면 영역.

  • 카메라의 위도에 따른 축척을 미터/픽셀 단위로 반환합니다.

    Declaration

    Objective-C

    - (double)metersPerPixel;

    Swift

    func metersPerPixel() -> Double

    Return Value

    축척. (미터/픽셀 단위)

  • 카메라의 위도, 줌 레벨에 따른 축척을 미터/픽셀 단위로 반환합니다.

    Declaration

    Objective-C

    - (double)metersPerPixelAtLatitude:(double)latitude zoom:(double)zoom;

    Swift

    func metersPerPixel(atLatitude latitude: Double, zoom: Double) -> Double

    Parameters

    latitude

    카메라의 위도.

    zoom

    줌 레벨.

    Return Value

    축척. (미터/픽셀 단위)