GMSMutablePath 클래스 참조

GMSMutablePath 클래스 참조

개요

GMSMutablePath는 CLLocationCoordinate2D의 동적 (크기 조절 가능한) 배열입니다.

모든 좌표는 유효해야 합니다. GMSMutablePath는 변경 불가능한 GMSPath에 대해 변경 가능한 상응 요소입니다.

GMSPath를 상속합니다.

공개 멤버 함수

(void) - addCoordinate:
 경로 끝에 coord를 추가합니다.
(void) - addLatitude:longitude:
 지정된 위도/경도를 사용하여 새 CLLocationCoordinate2D 인스턴스를 추가합니다.
(void) - insertCoordinate:atIndex:
 indexcoord를 삽입합니다.
(void) - replaceCoordinateAtIndex:withCoordinate:
 index의 좌표를 coord로 바꿉니다.
(void) - removeCoordinateAtIndex:
 index에서 항목을 삭제합니다.
(void) - removeLastCoordinate
 경로의 마지막 좌표를 삭제합니다.
(void) - removeAllCoordinates
 이 경로의 모든 좌표를 삭제합니다.
(ID)- initWithPath:
 다른 GMSPath의 콘텐츠를 사용하여 새로 할당된 경로를 초기화합니다.
(NSUInteger)- 개수
 경로의 크기를 가져옵니다.
(CLLocationCoordinate2D) - CoordinateAtIndex:
 index >= count인 경우 kCLLocationCoordinate2DInvalid를 반환합니다.
(NSString *)- encodedPath
 위에 설명된 형식으로 경로의 인코딩된 문자열을 반환합니다.
(인스턴스 유형)- pathOffsetByLatitude:longitude:
 현재 경로의 각 좌표에 deltaLatitudedeltaLongitude를 추가하여 얻은 새 경로를 반환합니다.
(2배)- segmentsForLength:kind:
 kind에 따라 해석된 length에 해당하는 경로에서 세그먼트의 일부를 반환합니다.
(CLLocationDistance)- lengthOfKind:
 kind에 따라 경로의 길이를 반환합니다.

정적 공개 멤버 함수

(인스턴스 유형)+ 경로
 빈 경로를 위한 편의 생성자입니다.
(null을 허용하는 인스턴스 유형)+ pathFromEncodedPath:
 encodedPath에서 새로 할당된 경로를 초기화합니다.

멤버 함수 문서

- (void) addCoordinate: (CLLocationCoordinate2D)  조정

경로 끝에 coord를 추가합니다.

- (void) addLatitude: (CLLocationDegrees) latitude
longitude: (CLLocationDegrees) longitude

지정된 위도/경도를 사용하여 새 CLLocationCoordinate2D 인스턴스를 추가합니다.

- (void) insertCoordinate: (CLLocationCoordinate2D)  조정
인덱스: (NSUInteger) 색인

indexcoord를 삽입합니다.

이 값이 경로의 크기보다 작으면 모든 좌표를 하나씩 앞으로 이동합니다. 그렇지 않으면 replaceCoordinateAtIndex:withCoordinate:로 동작합니다.

- (void) replaceCoordinateAtIndex: (NSUInteger) 색인
withCoordinate: (CLLocationCoordinate2D)  coord

index의 좌표를 coord로 바꿉니다.

index가 끝 뒤에 있으면 정의되지 않은 좌표를 사용하여 배열을 늘립니다.

- (void) removeCoordinateAtIndex: (NSUInteger) 색인

index에서 항목을 삭제합니다.

index < count 는 크기를 감소시킵니다. index >= count인 경우 무음 노옵스(no-ops)입니다.

경로의 마지막 좌표를 삭제합니다.

배열이 비어 있지 않으면 크기를 줄입니다. 배열이 비어 있으면 무음 노옵스(no-ops)입니다.

이 경로의 모든 좌표를 삭제합니다.

+ (instancetype) path

빈 경로를 위한 편의 생성자입니다.

- (ID) initWithPath: (GMSPath *) 경로

다른 GMSPath의 콘텐츠를 사용하여 새로 할당된 경로를 초기화합니다.

- (NSUInteger)개수

경로의 크기를 가져옵니다.

- (CLLocationCoordinate2D) CoordinateAtIndex: (NSUInteger) 색인

index >= count인 경우 kCLLocationCoordinate2DInvalid를 반환합니다.

+ (null을 허용하는 인스턴스 유형) pathFromEncodedPath: (NSString *) encodedPath

encodedPath에서 새로 할당된 경로를 초기화합니다.

이 형식은 https://developers.google.com/maps/documentation/utilities/polylinealgorithm에 설명되어 있습니다.

- (NSString *) encodedPath

위에 설명된 형식으로 경로의 인코딩된 문자열을 반환합니다.

- (instancetype) pathOffsetByLatitude: (CLLocationDegrees) deltaLatitude
longitude: (CLLocationDegrees) deltaLongitude

현재 경로의 각 좌표에 deltaLatitudedeltaLongitude를 추가하여 얻은 새 경로를 반환합니다.

현재 경로를 수정하지 않습니다.

- (double) SegmentsForLength: (CLLocationDistance) 길이
kind: (GMSLengthKind) 종류

kind에 따라 해석된 length에 해당하는 경로에서 세그먼트의 일부를 반환합니다.

GMSLengthKind를 참고하세요.

- (CLLocationDistance) lengthOfKind: (GMSLengthKind) kind

kind에 따라 경로의 길이를 반환합니다.

GMSLengthKind를 참고하세요.