GMSPath クラス リファレンス


概要

GMSPath は、CLLocationCooordinate2D の不変配列をカプセル化します。

GMSPath の座標はすべて有効でなければなりません。変更可能なものは GMSMutablePath です。

GMSMutablePath によって継承されます。

パブリック メンバー関数

(id)- initWithPath:
 新しく割り当てられたパスを別の GMSPath の内容で初期化します。
(NSUInteger) - count
 パスのサイズを取得します。
(CLLocationCoordinate2D) - CoordinateAtIndex:
 index >= count の場合、kCLLocationCoordinate2DInvalid を返します。
(NSString *) - encodedPath
 パスを上記の形式でエンコードした文字列で返します。
(instancetype)- pathOffsetByLatitude:longitude:
 現在の経路の各座標に deltaLatitudedeltaLongitude を加算した新しい経路を返します。
(double)- segmentsForLength:kind:
 kind に従って解釈される length に対応する、パス上の小数個のセグメントを返します。
(CLLocationDistance)- lengthOfKind:
 kind に応じたパスの長さを返します。

静的パブリック メンバー関数

(instancetype)+ パス
 空のパス用のコンビニエンス コンストラクタ。
(null 許容の instancetype)+ pathFromEncodedPath:
 encodedPath から新しく割り当てられたパスを初期化します。

メンバー関数のドキュメント

+ (instancetype) パス

空のパス用のコンビニエンス コンストラクタ。

- (id)initWithPath: GMSPath *) path

新しく割り当てられたパスを別の GMSPath の内容で初期化します。

-(NSUInteger)count

パスのサイズを取得します。

- (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)segmentForLength: (CLLocationDistance) 長さ
kind: GMSLengthKind kind

kind に従って解釈される length に対応する、パス上の小数個のセグメントを返します。

GMSLengthKind をご覧ください。

- (CLLocationDistance) lengthOfKind: GMSLengthKind kind

kind に応じたパスの長さを返します。

GMSLengthKind をご覧ください。