GPKGMapShapePoints
Objective-C
@interface GPKGMapShapePoints : NSObject
Swift
class GPKGMapShapePoints : NSObject
Map Shape with map points and corresponding shape point objects
-
Map shape
Declaration
Objective-C
@property (nonatomic, strong) GPKGMapShape *shape;Swift
var shape: GPKGMapShape! { get set } -
Mapping between point ids and shape points they belong to (or NSNull for non shapes)
Declaration
Objective-C
@property (nonatomic, strong) NSMutableDictionary *shapePoints;Swift
var shapePoints: NSMutableDictionary! { get set } -
Initialize
Declaration
Objective-C
- (instancetype)init;Swift
init!()Return Value
new map shape points
-
Add the point to the shape
Declaration
Objective-C
- (void)addPoint:(GPKGMapPoint *)point withShape:(NSObject<GPKGShapePoints> *)shapePoints;Swift
func add(_ point: GPKGMapPoint!, withShape shapePoints: (any GPKGShapePoints)!)Parameters
pointmap point
shapePointsshape points
-
Add the point id to the shape
Declaration
Objective-C
- (void)addPointId:(int)pointId withShape:(NSObject<GPKGShapePoints> *)shapePoints;Swift
func addPointId(_ pointId: Int32, withShape shapePoints: (any GPKGShapePoints)!)Parameters
pointIdmap point id
shapePointsshape points
-
Add all map points in the shape
Declaration
Objective-C
- (void)addShapePoints:(NSObject<GPKGShapePoints> *)shapePoints;Swift
func addShapePoints(_ shapePoints: (any GPKGShapePoints)!)Parameters
shapePointsshape points
-
Add a map point with no shape
Declaration
Objective-C
- (void)addPoint:(GPKGMapPoint *)point;Swift
func add(_ point: GPKGMapPoint!)Parameters
pointmap point
-
Add an array of map points with no shape
Declaration
Objective-C
- (void)addPoints:(NSArray *)points;Swift
func add(_ points: [Any]!)Parameters
pointsmap points
-
Add an embedded map shape points
Declaration
Objective-C
- (void)addMapShapePoints:(GPKGMapShapePoints *)mapShapePoints;Swift
func add(_ mapShapePoints: GPKGMapShapePoints!)Parameters
mapShapePointsmap shape points
-
Check if contains the shape point
Declaration
Objective-C
- (BOOL)containsPoint:(GPKGMapPoint *)point;Swift
func contains(_ point: GPKGMapPoint!) -> BoolParameters
pointmap point
Return Value
true if contains point
-
Check if contains the shape point id
Declaration
Objective-C
- (BOOL)containsPointId:(int)pointId;Swift
func containsPointId(_ pointId: Int32) -> BoolParameters
pointIdmap point id
Return Value
true if contains point id
-
Get the shape points for a map point, only returns a value for shapes that can be edited
Declaration
Objective-C
- (NSObject<GPKGShapePoints> *)shapePointsForPoint:(GPKGMapPoint *)point;Swift
func shapePoints(for point: GPKGMapPoint!) -> (any GPKGShapePoints)!Parameters
pointmap point
Return Value
shape points
-
Get the shape points for a map point id, only returns a value for shapes that can be edited
Declaration
Objective-C
- (NSObject<GPKGShapePoints> *)shapePointsForPointId:(int)pointId;Swift
func shapePoints(forPointId pointId: Int32) -> (any GPKGShapePoints)!Parameters
pointIdmap point id
Return Value
shape points
-
Delete the map point and corresponding shape from the map view
Declaration
Objective-C
- (BOOL)deletePoint:(GPKGMapPoint *)point fromMapView:(MKMapView *)mapView;Swift
func delete(_ point: GPKGMapPoint!, from mapView: MKMapView!) -> BoolParameters
pointmap point
mapViewmap view
Return Value
true if deleted
-
Removes all objects added to the map view
Declaration
Objective-C
- (void)removeFromMapView:(MKMapView *)mapView;Swift
func remove(from mapView: MKMapView!)Parameters
mapViewmap view
-
Updates all objects on the map view that could have changed from moved points
Declaration
Objective-C
- (void)updateWithMapView:(MKMapView *)mapView;Swift
func update(with mapView: MKMapView!)Parameters
mapViewmap view
-
Determines if the shape is in a valid state
Declaration
Objective-C
- (BOOL)isValid;Swift
func isValid() -> BoolReturn Value
true if valid
-
Polygon add a map point to the points where it is closest to the surrounding points
Declaration
Objective-C
+ (void)addPointAsPolygon:(GPKGMapPoint *)point toPoints:(NSMutableArray *)points;Swift
class func addPoint(asPolygon point: GPKGMapPoint!, toPoints points: NSMutableArray!)Parameters
pointmap point
pointspolygon points
-
Polyline add a map point to the points where it is closest to the surrounding points
Declaration
Objective-C
+ (void)addPointAsPolyline:(GPKGMapPoint *)point toPoints:(NSMutableArray *)points;Swift
class func addPoint(asPolyline point: GPKGMapPoint!, toPoints points: NSMutableArray!)Parameters
pointmap point
pointspolyline points
-
Updates hidden state of all objects
Declaration
Objective-C
- (void)hidden:(BOOL)hidden fromMapView:(MKMapView *)mapView;Swift
func hidden(_ hidden: Bool, from mapView: MKMapView!)Parameters
hiddenhidden flag
mapViewmap view
-
Updates hidden state of the shape representing points
Declaration
Objective-C
- (void)hiddenPoints:(BOOL)hidden;Swift
func hiddenPoints(_ hidden: Bool)Parameters
hiddenhidden flag
-
Get the shape markers size
Declaration
Objective-C
- (int)size;Swift
func size() -> Int32Return Value
size
-
Check if the shape markers is empty
Declaration
Objective-C
- (int)isEmpty;Swift
func isEmpty() -> Int32Return Value
true if empty
View on GitHub
GPKGMapShapePoints Class Reference