GMSPath 類別參考資料

GMSPath 類別參照

總覽

GMSPath 會封裝不可變動的 CLLocationCooordinate2D 陣列。

GMSPath的所有座標都必須有效。可變動的對應物件為 GMSMutablePath

沿用 GMSMutablePath

公開成員函式

(ID)- initWithPath:
 使用另一個 GMSPath的內容初始化新分配的路徑。
(NSUInteger)- count
 取得路徑大小。
(CLLocationCoordinate2D)- 協調中心 AtIndex:
 如果 index >= 計數,則傳回 kCLLocationCoordinate2DInvalid。
(NSString *)- encodedPath
 以上述格式傳迴路徑的編碼字串。
(執行個體類型)- pathOffsetByLatitude:經度:
 deltaLatitudedeltaLongitude 新增至目前路徑的每個座標,以傳回新路徑。
(雙倍)- SegmentsForLength:Kind:
 根據路徑 kind,傳迴路徑中對應 length 的片段數量。
(CLLocationDistance)- lengthOfKind:
 根據 kind 傳迴路徑長度。

靜態公開成員函式

(執行個體類型)+ 路徑
 空白路徑的便利建構函式。
(可為空值的執行個體類型)。+ pathFromEncodedPath:
 encodedPath 初始化新分配的路徑。

成員函式說明文件

+ (執行個體類型) 路徑

空白路徑的便利建構函式。

- (ID) initWithPath: (GMSPath *) 路徑

使用另一個 GMSPath的內容初始化新分配的路徑。

- (NSUInteger) count

取得路徑大小。

- (CLLocationCoordinate2D) 座標 AtIndex: (NSUInteger) 索引

如果 index >= 計數,則傳回 kCLLocationCoordinate2DInvalid。

+ (可為空值的執行個體類型) pathFromEncodedPath: (NSString *) encodedPath

encodedPath 初始化新分配的路徑。

格式如下:https://developers.google.com/maps/documentation/utilities/polylinealgorithm

- (NSString *) encodedPath

以上述格式傳迴路徑的編碼字串。

- (執行個體類型) pathOffsetByLatitude: (CLLocationDegrees) 差異遷移
經度: (CLLocationDegrees) deltaLongitude

deltaLatitudedeltaLongitude 新增至目前路徑的每個座標,以傳回新路徑。

不會修改目前的路徑。

- (雙重)區隔 ForLength: (CLLocationDistance) 長度
kind: (GMSLengthKind) 種類

根據路徑 kind,傳迴路徑中對應 length 的片段數量。

請參閱 GMSLengthKind。

- (CLLocationDistance) lengthOfKind: (GMSLengthKind) 種類

根據 kind 傳迴路徑長度。

請參閱 GMSLengthKind。