GMSMutablePath.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // GMSMutablePath.h
  3. // Google Maps SDK for iOS
  4. //
  5. // Copyright 2013 Google Inc.
  6. //
  7. // Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
  8. // Service: https://developers.google.com/maps/terms
  9. //
  10. #import <GoogleMaps/GMSPath.h>
  11. #import <CoreLocation/CoreLocation.h>
  12. #import <Foundation/Foundation.h>
  13. /**
  14. * GMSMutablePath is a dynamic (resizable) array of CLLocationCoordinate2D. All coordinates must be
  15. * valid. GMSMutablePath is the mutable counterpart to the immutable GMSPath.
  16. */
  17. @interface GMSMutablePath : GMSPath
  18. /** Adds |coord| at the end of the path. */
  19. - (void)addCoordinate:(CLLocationCoordinate2D)coord;
  20. /** Adds a new CLLocationCoordinate2D instance with the given lat/lng. */
  21. - (void)addLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude;
  22. /**
  23. * Inserts |coord| at |index|.
  24. *
  25. * If this is smaller than the size of the path, shifts all coordinates forward by one. Otherwise,
  26. * behaves as replaceCoordinateAtIndex:withCoordinate:.
  27. */
  28. - (void)insertCoordinate:(CLLocationCoordinate2D)coord atIndex:(NSUInteger)index;
  29. /**
  30. * Replace the coordinate at |index| with |coord|. If |index| is after the end, grows the array with
  31. * an undefined coordinate.
  32. */
  33. - (void)replaceCoordinateAtIndex:(NSUInteger)index
  34. withCoordinate:(CLLocationCoordinate2D)coord;
  35. /**
  36. * Remove entry at |index|.
  37. *
  38. * If |index| < count decrements size. If |index| >= count this is a silent
  39. * no-op.
  40. */
  41. - (void)removeCoordinateAtIndex:(NSUInteger)index;
  42. /**
  43. * Removes the last coordinate of the path.
  44. *
  45. * If the array is non-empty decrements size. If the array is empty, this is a silent no-op.
  46. */
  47. - (void)removeLastCoordinate;
  48. /** Removes all coordinates in this path. */
  49. - (void)removeAllCoordinates;
  50. @end