概要
GMSMutablePath は、CLLocationCoordinate2D の(サイズ変更可能な)動的な配列です。
すべての座標が有効である必要があります。GMSMutablePath は、不変の GMSPath と変更可能なオプションです。
GMSPath を継承します。
パブリック メンバー関数 | |
(void) | - addCoordinate: |
パスの末尾に coord を追加します。 | |
(void) | - addLatitude:経度: |
指定された lat/lng の新しい CLLocationCoordinate2D インスタンスを追加します。 | |
(void) | - insertCoordinate:atIndex: |
index に coord を挿入します。 | |
(void) | - ReplaceCoordinateAtIndex:withCoordinate: |
index の座標を coord に置き換えます。 | |
(void) | - removeCoordinateAtIndex: |
index のエントリを削除します。 | |
(void) | - removeLastCoordinate |
パスの最後の座標を削除します。 | |
(void) | - removeAllCoordinates |
このパスのすべての座標を削除します。 | |
(id) | - initWithPath: |
新しく割り当てられたパスを別の GMSPath のコンテンツで初期化します。 | |
(NSUInteger) | - count 件 |
パスのサイズを取得します。 | |
(CLLocationCoordinate2D) | - CoordinateAtIndex: |
index >= count の場合、kCLLocationCoordinate2DInvalid を返します。 | |
(NSString *) | - encodedPath |
パスのエンコード文字列を上記の形式で返します。 | |
(インスタンス タイプ) | - pathOffsetByLatitude:longitude: |
現在のパスの各座標に deltaLatitude と deltaLongitude を加算して取得した新しいパスを返します。 | |
(ダブル) | - SegmentsForLength:kind: |
length に対応するパスに沿ったセグメントの小数の割合を返します。kind に従って解釈されます。 | |
(CLLocationDistance) | - lengthOfKind: |
パスの長さを kind に従って返します。 | |
静的パブリック メンバー関数 | |
(インスタンス タイプ) | + パス |
空のパスのコンビニエンス コンストラクタ。 | |
(null 値許容インスタンス タイプ) | + pathFromEncodedPath: |
encodedPath から新しく割り当てられたパスを初期化します。 |
メンバー関数のドキュメント
- (void)addCoordinate: | (CLLocationCoordinate2D) | Coord |
パスの末尾に coord
を追加します。
- (void) addLatitude: | (CLLocationDegrees) | latitude | |
経度: | (CLLocationDegrees) | 経度 | |
指定された lat/lng の新しい CLLocationCoordinate2D インスタンスを追加します。
- (void) insertCoordinate: | (CLLocationCoordinate2D) | Coord | |
atIndex: | (NSUInteger) | index | |
index
に coord
を挿入します。
パスのサイズより小さい場合は、すべての座標が 1 つ前方にシフトします。それ以外の場合は、replaceCoordinateAtIndex:withCoordinate: と同じように動作します。
- (void) replaceCoordinateAtIndex: | (NSUInteger) | index | |
withCoordinate: | (CLLocationCoordinate2D) | coord | |
index
の座標を coord
に置き換えます。
index
が終了した場合、未定義の座標で配列が拡張されます。
- (void)removeCoordinateAtIndex: | (NSUInteger) | index |
index
のエントリを削除します。
index
< カウントを減らすサイズ。index
以上の場合、これはサイレントな NoOps です。
- (void)removeLastCoordinate |
パスの最後の座標を削除します。
配列が空のデクリメント サイズでない場合。配列が空の場合、これはサイレント NoOps です。
- (void)removeAllCoordinates |
このパスのすべての座標を削除します。
+(インスタンス タイプ)path |
空のパスのコンビニエンス コンストラクタ。
- (id)initWithPath: | (GMSPath *) | path |
新しく割り当てられたパスを別の GMSPath のコンテンツで初期化します。
-(NSUInteger)count |
パスのサイズを取得します。
- (CLLocationCoordinate2D)CoordinateAtIndex: | (NSUInteger) | index |
index
>= count の場合、kCLLocationCoordinate2DInvalid を返します。
+(null 許容のインスタンス タイプ)pathFromEncodedPath: | (NSString *) | encodedPath |
encodedPath
から新しく割り当てられたパスを初期化します。
この形式は https://developers.google.com/maps/documentation/utilities/polylinealgorithm に記載されています。
- (NSString *)encodedPath |
パスのエンコード文字列を上記の形式で返します。
- (インスタンス タイプ)pathOffsetByLatitude: | (CLLocationDegrees) | deltaLatitude | |
経度: | (CLLocationDegrees) | deltaLongitude | |
現在のパスの各座標に deltaLatitude
と deltaLongitude
を加算して取得した新しいパスを返します。
現在のパスは変更されません。
- (ダブル)セグメント ForLength: | (CLLocationDistance) | length(長さ) | |
kind: | (GMSLengthKind) | kind | |
length
に対応するパスに沿ったセグメントの小数の割合を返します。kind
に従って解釈されます。
GMSLengthKind をご覧ください。
-(CLLocationDistance)lengthOfKind: | (GMSLengthKind) | 種類 |
パスの長さを kind
に従って返します。
GMSLengthKind をご覧ください。