CartoType iOS API 8.8-13-g03c6f7017
for development in Swift and Objective C for iOS and Mac OS
|
#import <CartoTypeBase.h>
Instance Methods | |
(id) | - initWithMapObject: |
(void) | - dealloc |
(NSString *) | - stringAttribute: |
(NSMutableDictionary *) | - stringAttributes |
(CartoTypeMatch *) | - match:matchMethod:attributes:phrase: |
(int) | - contourCount |
(int) | - pointCount: |
(CartoTypePathPoint) | - point:pointIndex: |
(void *) | - object |
(int) | - contourCount |
(int) | - pointCount: |
(CartoTypePathPoint) | - point:pointIndex: |
Properties | |
CartoTypeMapObjectType | type |
NSString * | layerName |
NSString * | label |
CartoTypeFeatureInfo * | featureInfo |
CartoTypePoint | center |
CartoTypeRect | bounds |
CartoTypePointAndResult | centerInDegrees |
CartoTypeRectAndResult | boundsInDegrees |
CartoTypeGeometryAndResult * | geometryInDegrees |
uint64_t | objectId |
double | area |
double | lengthOrPerimeter |
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.
- (id) initWithMapObject: | (void *) | aMapObject |
Initializes a CartoTypeMapObject with a C++ map object; for internal use only.
- (CartoTypeMatch *) match: | (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. 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 *) object |
Gets a pointer to the 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>.
- (NSString *) stringAttribute: | (NSString *) | aAttribName |
Gets any string attribute. If aAttribName is null, gets the label.
- (NSMutableDictionary *) stringAttributes |
Gets all the string attributes as a dictionary of key-value pairs.
|
readwritenonatomicassign |
The area of the map object in square meters. Returns zero for a point object.
|
readwritenonatomicassign |
The axis-aligned bounding box of a map object, in map coordinates.
|
readwritenonatomicassign |
The bounding box of a map object in degrees.
|
readwritenonatomicassign |
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.
|
readwritenonatomicassign |
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.
|
readwritenonatomicassign |
The feature info of a map object.
|
readwritenonatomicassign |
The geometry of a map object in degrees.
|
readwritenonatomicassign |
The label or standard name of the map object.
|
readwritenonatomicassign |
The name of the map layer to which the map object belongs.
|
readwritenonatomicassign |
The length or perimeter of the map object in meters. Returns zero for a point object.
|
readwritenonatomicassign |
The object ID of the map object, which can be used to delete objects inserted at run-time.
|
readwritenonatomicassign |
The type of the map object: point, line, polygon or array.