Stay organized with collections Save and categorize content based on your preferences.
GMSPath@interface GMSPath : NSObject <NSCopying, NSMutableCopying>
GMSPath
encapsulates an immutable array of CLLocationCooordinate2D
. All the coordinates of a GMSPath
must be valid. The mutable counterpart is GMSMutablePath
.
Convenience constructor for an empty path.
DeclarationObjective-C
+ (nonnull instancetype)path;
Initializes a newly allocated path with the contents of another GMSPath
.
Swift
init(path: GMSPath)
Objective-C
- (nonnull id)initWithPath:(nonnull GMSPath *)path;
Get size of path.
DeclarationSwift
func count() -> UInt
Objective-C
- (NSUInteger)count;
Returns kCLLocationCoordinate2DInvalid
if index
>= count.
Swift
func coordinate(at index: UInt) -> CLLocationCoordinate2D
Objective-C
- (CLLocationCoordinate2D)coordinateAtIndex:(NSUInteger)index;
Returns an encoded string of the path in the format described above.
DeclarationSwift
func encodedPath() -> String
Objective-C
- (nonnull NSString *)encodedPath;
Returns a new path obtained by adding deltaLatitude
and deltaLongitude
to each coordinate of the current path. Does not modify the current path.
Swift
func pathOffset(byLatitude deltaLatitude: CLLocationDegrees, longitude deltaLongitude: CLLocationDegrees) -> Self
Objective-C
- (nonnull instancetype)pathOffsetByLatitude:(CLLocationDegrees)deltaLatitude
longitude:(CLLocationDegrees)deltaLongitude;
Returns the fractional number of segments along the path that correspond to length
, interpreted according to kind
. See GMSLengthKind
.
Swift
func segments(forLength length: CLLocationDistance, kind: GMSLengthKind) -> Double
Objective-C
- (double)segmentsForLength:(CLLocationDistance)length kind:(GMSLengthKind)kind;
Returns the length of the path, according to kind
. See GMSLengthKind
.
Objective-C
- (CLLocationDistance)lengthOfKind:(GMSLengthKind)kind;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-15 UTC."],[[["`GMSPath` is an immutable class representing an ordered sequence of geographical coordinates, ideal for drawing lines or defining areas on a map."],["It provides methods for creating paths, accessing individual coordinates, and encoding/decoding paths using the Google Maps Polyline Algorithm."],["`GMSPath` allows for calculating path length and segment lengths using different metrics (e.g., geodesic or rhumb)."],["You can create a new path by offsetting each coordinate by specified latitude and longitude deltas."],["A mutable version, `GMSMutablePath`, allows for modifying the coordinates of a path."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4