CartoType iOS API 8.10-3-g0075538f6
for development in Swift and Objective C for iOS and Mac OS
Instance Methods | Properties | List of all members
CartoTypeMapObject Class Reference

#import <CartoTypeBase.h>

Inheritance diagram for CartoTypeMapObject:
<CartoTypePath>

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
 
CartoTypeFeatureInfofeatureInfo
 
CartoTypePoint center
 
CartoTypeRect bounds
 
CartoTypePointAndResult centerInDegrees
 
CartoTypeRectAndResult boundsInDegrees
 
CartoTypeGeometryAndResultgeometryInDegrees
 
uint64_t objectId
 
double area
 
double lengthOrPerimeter
 

Detailed Description

A map object: a point, line, polygon or array (texture), with its name, layer, ID and other attributes.

Method Documentation

◆ contourCount

- (int) contourCount

Gets the number of contours (sub-paths) in the path.

Reimplemented from <CartoTypePath>.

◆ dealloc

- (void) dealloc

Destroys the map object.

◆ initWithMapObject:

- (id) initWithMapObject: (void *)  aMapObject

Initializes a CartoTypeMapObject with a C++ map object; for internal use only.

◆ match:matchMethod:attributes:phrase:

- (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.

◆ object

- (void *) object

Gets a pointer to the C++ map object; for internal use only.

◆ point:pointIndex:

- (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>.

◆ pointCount:

- (int) pointCount: (int)  aContourIndex

Gets the number of points in a certain contour.

Reimplemented from <CartoTypePath>.

◆ stringAttribute:

- (NSString *) stringAttribute: (NSString *)  aAttribName

Gets any string attribute. If aAttribName is null, gets the label.

◆ stringAttributes

- (NSMutableDictionary *) stringAttributes

Gets all the string attributes as a dictionary of key-value pairs.

Property Documentation

◆ area

- (double) area
readwritenonatomicassign

The area of the map object in square meters. Returns zero for a point object.

◆ bounds

- (CartoTypeRect) bounds
readwritenonatomicassign

The axis-aligned bounding box of a map object, in map coordinates.

◆ boundsInDegrees

- (CartoTypeRectAndResult) boundsInDegrees
readwritenonatomicassign

The bounding box of a map object in degrees.

◆ center

- (CartoTypePoint) center
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.

◆ centerInDegrees

- (CartoTypePointAndResult) centerInDegrees
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.

◆ featureInfo

- (CartoTypeFeatureInfo*) featureInfo
readwritenonatomicassign

The feature info of a map object.

◆ geometryInDegrees

- (CartoTypeGeometryAndResult*) geometryInDegrees
readwritenonatomicassign

The geometry of a map object in degrees.

◆ label

- (NSString*) label
readwritenonatomicassign

The label or standard name of the map object.

◆ layerName

- (NSString*) layerName
readwritenonatomicassign

The name of the map layer to which the map object belongs.

◆ lengthOrPerimeter

- (double) lengthOrPerimeter
readwritenonatomicassign

The length or perimeter of the map object in meters. Returns zero for a point object.

◆ objectId

- (uint64_t) objectId
readwritenonatomicassign

The object ID of the map object, which can be used to delete objects inserted at run-time.

◆ type

- (CartoTypeMapObjectType) type
readwritenonatomicassign

The type of the map object: point, line, polygon or array.


The documentation for this class was generated from the following file: