CartoType iOS API 7.8.2, 2022-03-25
for development in Swift and Objective C for iOS and Mac OS
|
#import <CartoTypeBase.h>
Instance Methods | |
(id) | - initWithMapObject: |
(void) | - dealloc |
(CartoTypeMapObjectType) | - getType |
(NSString *) | - getLayerName |
(NSString *) | - getLabel |
(NSString *) | - getStringAttribute: |
(NSMutableDictionary *) | - getStringAttributes |
(int32_t) | - getIntAttribute |
(CartoTypePoint) | - getCenter |
(CartoTypeRect) | - getBounds |
(CartoTypePointAndResult) | - getCenterInDegrees |
(CartoTypeRectAndResult) | - getBoundsInDegrees |
(CartoTypeGeometryAndResult *) | - getGeometryInDegrees |
(CTResult) | - getMatch:text:matchMethod:attributes:phrase: |
(uint64_t) | - getObjectId |
(int) | - contourCount |
(int) | - pointCount: |
(CartoTypePathPoint) | - point:pointIndex: |
(void *) | - getObject |
(int) | - contourCount |
(int) | - pointCount: |
(CartoTypePathPoint) | - point:pointIndex: |
A map object: a point, line, polygon or array (texture), with its name, layer, ID and other attributes.
- (int) contourCount |
Gets the number of contours (sub-paths) in the path.
Reimplemented from <CartoTypePath>.
- (void) dealloc |
Destroys the map object.
- (CartoTypeRect) getBounds |
Returns the axis-aligned bounding box of a map object, in map coordinates.
- (CartoTypeRectAndResult) getBoundsInDegrees |
Returns the bounding box of a map object in degrees.
- (CartoTypePoint) getCenter |
Returns the center of a map object in map coordinates. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points.
- (CartoTypePointAndResult) getCenterInDegrees |
Returns the center of a map object in degrees. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points. Because the center is calculated using map coordinates then converted to degrees, it depends on the map projection used by the map object.
- (CartoTypeGeometryAndResult *) getGeometryInDegrees |
Returns the geometry of a map object in degrees.
- (int32_t) getIntAttribute |
Gets the integer attribute of a map object.
- (NSString *) getLabel |
Gets the label or standard name of the map object.
- (NSString *) getLayerName |
Gets the name of the map layer to which the map object belongs.
- (CTResult) getMatch: | (CartoTypeMatch *) | aMatch | |
text: | (NSString *) | aText | |
matchMethod: | (CartoTypeStringMatchMethod) | aMethod | |
attributes: | (NSString *) | aAttributes | |
phrase: | (bool) | aPhrase | |
Finds the first string attribute matching aText, using aMatchMethod, and returns information about it in aMatch. If aAttributes is non-null this function examines only attributes in the supplied comma-separated list, otherwise it examines all attributes except those starting with an underscore, which by convention are non-textual. Attribute names may contain the wild cards ? and *. If aPhrase is true matches of phrases within the attribute are allowed.
- (void *) getObject |
Gets a pointer to the C++ map object; for internal use only.
- (uint64_t) getObjectId |
Gets the object ID of the map object, which can be used to delete objects inserted at run-time.
- (NSString *) getStringAttribute: | (NSString *) | aAttribName |
Gets any string attribute. If aAttribName is null, gets the label.
- (NSMutableDictionary *) getStringAttributes |
Gets all the string attributes as a dictionary of key-value pairs.
- (CartoTypeMapObjectType) getType |
Gets the type of the map object: point, line, polygon or array.
- (id) initWithMapObject: | (void *) | aMapObject |
Initializes a CartoTypeMapObject with a C++ map object; for internal use only.
- (CartoTypePathPoint) point: | (int) | aContourIndex | |
pointIndex: | (int) | aPointIndex | |
Gets a point, given its contour index and point index. Returns (0,0) if the contour index or point index is out of range.
Reimplemented from <CartoTypePath>.
- (int) pointCount: | (int) | aContourIndex |
Gets the number of points in a certain contour.
Reimplemented from <CartoTypePath>.