AI-generated Key Takeaways
- 
          GMSMutablePathis 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. 
- 
          GMSMutablePathallows for flexible manipulation of paths, enabling adjustments to routes or shapes on a map.
- 
          It acts as the mutable counterpart to the immutable GMSPathclass.
- 
          Developers can utilize GMSMutablePathto create, modify, and manage paths for mapping and location-based applications.
GMSMutablePath
@interface GMSMutablePath : GMSPathGMSMutablePath is a dynamic (resizable) array of CLLocationCoordinate2D. All coordinates
must be valid. GMSMutablePath is the mutable counterpart to the immutable GMSPath.
- 
                  
                  Adds coordat the end of the path.DeclarationSwift 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;
- 
                  
                  Inserts coordatindex.If this is smaller than the size of the path, shifts all coordinates forward by one. Otherwise, behaves as -replaceCoordinateAtIndex:withCoordinate:.DeclarationSwift func insert(_ coord: CLLocationCoordinate2D, at index: UInt)Objective-C - (void)insertCoordinate:(CLLocationCoordinate2D)coord atIndex:(NSUInteger)index;
- 
                  
                  Replace the coordinate at indexwithcoord. Ifindexis after the end, grows the array with an undefined coordinate.DeclarationSwift 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. Ifindex>= count this is a silent no-op.DeclarationSwift 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;