TGGeoPolyline
@interface TGGeoPolyline : NSObject
Helper class to contain a polyline geometry for use in -[TGMarker polyline].
Set the geometry of a marker to a polyline along the given coordinates; _coordinates is a pointer to a sequence of _count LngLats; markers can have their geometry set multiple times with possibly different geometry types; returns true if the marker ID was found and successfully updated, otherwise returns false.
-
Inits a
TGGeoPolylineand allocate enough memory to holdsizegeographic coordinates.Declaration
Objective-C
- (nonnull instancetype)initWithSize:(NSUInteger)size;Swift
init(size: UInt) -
Adds a geographic coordinate to the polyline.
Declaration
Objective-C
- (void)addPoint:(CLLocationCoordinate2D)point;Swift
func addPoint(_ point: CLLocationCoordinate2D)Parameters
pointthe geographic coordinate to add to this polyline
-
Gets the number of geographic coordinates describing this polyline.
Declaration
Objective-C
- (NSUInteger)count;Swift
func count() -> UIntReturn Value
the number of geographic coordinates in this polyline
-
Gets a pointer to the geographic coordinates describing this poyline of array length
-[TGGeoPolyline count:].Declaration
Objective-C
- (nonnull CLLocationCoordinate2D *)coordinates;Swift
func coordinates() -> UnsafeMutablePointer<CLLocationCoordinate2D>Return Value
a pointer to the list of geographic coordinates describing this polyline
-
Removes all coordinates of this polyline.
Declaration
Objective-C
- (void)removeAll;Swift
func removeAll()
View on GitHub
TGGeoPolyline Class Reference
