MarkerObject
Objective-C
@interface MarkerObject : NSObject
Swift
class MarkerObject : NSObject
This class encapsulates marker information.
-
Initializes and returns a newly allocated object using the model data..
Declaration
Objective-C
- (nonnull instancetype)initWithModelData:(nonnull void *)data;
-
Initializes and returns a newly allocated object using the array coordinates.
Declaration
Objective-C
- (nonnull instancetype)initWithCoordinates: (nonnull NSArray<CoordinatesObject *> *)array;
Swift
init(coordinates array: [CoordinatesObject])
-
Initializes and returns a newly allocated object using the center coordinates and the radius in meters.
Declaration
Objective-C
- (nonnull instancetype)initWithCircleCenter: (nonnull CoordinatesObject *)coordinates radius:(int)radius;
Swift
init(circleCenter coordinates: CoordinatesObject, radius: Int32)
-
Initializes and returns a newly allocated object using the center coordinates and the horizontal and vertical rectangle radius in meters.
Declaration
Objective-C
- (nonnull instancetype)initWithRectangleShapeCenter: (nonnull CoordinatesObject *)coordinates horizRadius:(int)horizRadius vertRadius:(int)vertRadius;
Swift
init(rectangleShapeCenter coordinates: CoordinatesObject, horizRadius: Int32, vertRadius: Int32)
-
Initializes and returns a newly allocated object using the rectangle coordinates corners.
Declaration
Objective-C
- (nonnull instancetype) initWithRectangleFirstCorner:(nonnull CoordinatesObject *)corner1 secondCorner:(nonnull CoordinatesObject *)corner2;
Swift
init(rectangleFirstCorner corner1: CoordinatesObject, secondCorner corner2: CoordinatesObject)
-
Initializes and returns a newly allocated object using the geographic area.
Declaration
Objective-C
- (nonnull instancetype)initWithGeographicArea: (nonnull GeographicAreaObject *)area;
Swift
init(geographicArea area: GeographicAreaObject)
-
Returns the model data.
Declaration
Objective-C
- (nonnull void *)getModelData;
-
Returns the marker unique id.
Declaration
Objective-C
- (NSInteger)getId;
Swift
func getId() -> Int
-
Returns the marker parts count.
Declaration
Objective-C
- (NSInteger)getPartCount;
Swift
func getPartCount() -> Int
-
Delete a part from marker.
Declaration
Objective-C
- (void)deletePart:(int)part;
Swift
func deletePart(_ part: Int32)
-
Returns the marker coordinates array.
Declaration
Objective-C
- (nonnull NSArray<CoordinatesObject *> *)getCoordinates;
Swift
func getCoordinates() -> [CoordinatesObject]
-
Returns the marker coordinates array.
Declaration
Objective-C
- (nonnull NSArray<CoordinatesObject *> *)getCoordinates:(int)part;
Swift
func getCoordinates(_ part: Int32) -> [CoordinatesObject]
Parameters
part
The marker part index to which the function applies, default 0 ( first part ).
-
Returns the first part marker enclosing area.
Declaration
Objective-C
- (nonnull RectangleGeographicAreaObject *)getArea;
Swift
func getArea() -> RectangleGeographicAreaObject
-
Returns the marker part enclosing area.
Declaration
Objective-C
- (nonnull RectangleGeographicAreaObject *)getPartArea:(int)part;
Swift
func getPartArea(_ part: Int32) -> RectangleGeographicAreaObject
Parameters
part
The marker part index to which the function applies.
-
Set marker first part coordinates.
Declaration
Objective-C
- (void)setCoordinates:(nonnull NSArray<CoordinatesObject *> *)array;
Swift
func setCoordinates(_ array: [CoordinatesObject])
Parameters
array
The coordinates array to be set.
-
Set marker part coordinates.
Declaration
Objective-C
- (void)setCoordinates:(nonnull NSArray<CoordinatesObject *> *)array part:(int)part;
Swift
func setCoordinates(_ array: [CoordinatesObject], part: Int32)
Parameters
array
The coordinates array to be set.
part
The marker part index to which the function applies.
-
Add a new coordinate to the marker.
Declaration
Objective-C
- (void)add:(nonnull CoordinatesObject *)location index:(int)index part:(int)part;
Swift
func add(_ location: CoordinatesObject, index: Int32, part: Int32)
Parameters
location
The coordinate object.
index
The position where the coordinate is added, default -1 ( append at the end ).
part
The marker part index to which the function applies. @details If part == getPartCount, a new part is automatically added to the marker and the coordinate is assigned to it.
-
Delete a coordinate from the marker.
Declaration
Objective-C
- (void)deleleFromIndex:(int)index part:(int)part;
Swift
func delele(from index: Int32, part: Int32)
Parameters
index
The position of the deleted coordinate.
part
The marker part index to which the function applies.
-
Update a coordinate in the marker.
Declaration
Objective-C
- (void)update:(nonnull CoordinatesObject *)location index:(int)index part:(int)part;
Swift
func update(_ location: CoordinatesObject, index: Int32, part: Int32)
Parameters
coord
The new coordinate value.
index
The position of the updated coordinate.
part
The marker part index to which the function applies.
-
Returns the marker name.
Declaration
Objective-C
- (nonnull NSString *)getName;
Swift
func getName() -> String
-
Set marker name.
Declaration
Objective-C
- (void)setName:(nonnull NSString *)name;
Swift
func setName(_ name: String)