Stay organized with collections Save and categorize content based on your preferences.
GMSMutablePath@interface GMSMutablePath : GMSPath
GMSMutablePath
is a dynamic (resizable) array of CLLocationCoordinate2D
. All coordinates must be valid. GMSMutablePath
is the mutable counterpart to the immutable GMSPath
.
Adds coord
at the end of the path.
Swift
func add(_ coord: CLLocationCoordinate2D)
Objective-C
- (void)addCoordinate:(CLLocationCoordinate2D)coord;
Adds a new CLLocationCoordinate2D instance with the given lat/lng.
DeclarationSwift
func addLatitude(_ latitude: CLLocationDegrees, longitude: CLLocationDegrees)
Objective-C
- (void)addLatitude:(CLLocationDegrees)latitude
longitude:(CLLocationDegrees)longitude;
Swift
func insert(_ coord: CLLocationCoordinate2D, at index: UInt)
Objective-C
- (void)insertCoordinate:(CLLocationCoordinate2D)coord
atIndex:(NSUInteger)index;
Replace the coordinate at index
with coord
. If index
is after the end, grows the array with an undefined coordinate.
Swift
func replaceCoordinate(at index: UInt, with coord: CLLocationCoordinate2D)
Objective-C
- (void)replaceCoordinateAtIndex:(NSUInteger)index
withCoordinate:(CLLocationCoordinate2D)coord;
Remove entry at index
.
If index
< count decrements size. If index
>= count this is a silent no-op.
Swift
func removeCoordinate(at index: UInt)
Objective-C
- (void)removeCoordinateAtIndex:(NSUInteger)index;
Removes the last coordinate of the path.
If the array is non-empty decrements size. If the array is empty, this is a silent no-op.
DeclarationSwift
func removeLastCoordinate()
Objective-C
- (void)removeLastCoordinate;
Removes all coordinates in this path.
DeclarationSwift
func removeAllCoordinates()
Objective-C
- (void)removeAllCoordinates;
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."],[[["`GMSMutablePath` is a dynamic array used to represent a series of geographical coordinates (`CLLocationCoordinate2D`)."],["It provides methods to add, insert, replace, and remove coordinates within the path."],["`GMSMutablePath` allows for flexible manipulation of paths, enabling resizing and modification of coordinate sequences."],["This class serves as the mutable counterpart to the read-only `GMSPath` class."]]],["`GMSMutablePath` is a resizable array for `CLLocationCoordinate2D` data. You can add coordinates to the end of the path using `addCoordinate:` or `addLatitude:longitude:`. `insertCoordinate:atIndex:` inserts a coordinate at a specific index. `replaceCoordinateAtIndex:withCoordinate:` updates an existing coordinate. Coordinates can be removed via `removeCoordinateAtIndex:`, `removeLastCoordinate`, or `removeAllCoordinates`.\n"]]
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