![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Accessor for a set of entities.
Allows creation and query of entities.
Public Member Functions | |
bool | appendData (const char *filename) |
bool | appendDataFromBuffer (unsigned char *buffer, TSLSize length) |
bool | clear () |
TSLArc * | createArc (TSLFeatureID featureID, double startAngle, double endAngle, TSLTMC cx, TSLTMC cy, TSLTMC radx, TSLTMC rady=0, double rotation=0) |
TSLBorderedPolygon * | createBorderedPolygon (TSLFeatureID featureID, TSLCoordSet *coords, TSLTMC width, bool keepCoordSet=false) |
TSLBorderedPolygon * | createBorderedPolygon (TSLFeatureID featureID, const TSLCoordSet &coords, TSLTMC width) |
TSLEntity * | createClone (const TSLEntity *source) |
TSLEllipse * | createEllipse (TSLFeatureID featureID, TSLTMC cx, TSLTMC cy, TSLTMC radx, TSLTMC rady=0, double rotation=0.0) |
TSLEntitySet * | createEntitySet () |
TSLGeodeticArc * | createGeodeticArc (TSLFeatureID featureID, double startAngle, double endAngle, TSLTMC cx, TSLTMC cy, double radx, double rady=0.0, double rotation=0) |
TSLGeodeticEllipse * | createGeodeticEllipse (TSLFeatureID featureID, TSLTMC cx, TSLTMC cy, double radx, double rady=0.0, double rotation=0.0) |
TSLGeodeticPolygon * | createGeodeticPolygon (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false) |
TSLGeodeticPolygon * | createGeodeticPolygon (TSLFeatureID featureID, const TSLCoordSet &coords) |
TSLGeodeticPolyline * | createGeodeticPolyline (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false) |
TSLGeodeticPolyline * | createGeodeticPolyline (TSLFeatureID featureID, const TSLCoordSet &coords) |
TSLGeodeticSymbol * | createGeodeticSymbol (TSLFeatureID featureID, TSLTMC x, TSLTMC y, TSLTMC height=100, double rotation=0) |
TSLGeodeticText * | createGeodeticText (TSLFeatureID featureID, TSLTMC x, TSLTMC y, const char *value, TSLTMC height=100, TSLHorizontalAlignment xalign=TSLHorizontalAlignmentCentre, TSLVerticalAlignment yalign=TSLVerticalAlignmentMiddle, double rotation=0) |
TSLPolygon * | createPolygon (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false) |
TSLPolygon * | createPolygon (TSLFeatureID featureID, const TSLCoordSet &coords) |
TSLPolyline * | createPolyline (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false) |
TSLPolyline * | createPolyline (TSLFeatureID featureID, const TSLCoordSet &coords) |
TSLRectangle * | createRectangle (TSLFeatureID featureID, const TSLCoord &bottomLeft, const TSLCoord &topRight, double rotation=0) |
TSLSymbol * | createSymbol (TSLFeatureID featureID, TSLTMC x, TSLTMC y, TSLTMC height=100, double rotation=0) |
TSLText * | createText (TSLFeatureID featureID, TSLTMC x, TSLTMC y, const char *value, TSLTMC height=100, TSLHorizontalAlignment xalign=TSLHorizontalAlignmentCentre, TSLVerticalAlignment yalign=TSLVerticalAlignmentMiddle, double rotation=0) |
TSLUserGeometryEntity * | createUserGeometry (TSLClientUserGeometryEntity *client, bool takeOwnership=true) |
bool | deleteBufferData (unsigned char *buffer) const |
int | find (const TSLEntity *entity) const |
bool | insert (TSLEntity *source, int index=-1) |
bool | loadData (const char *filename) |
bool | loadDataFromBuffer (unsigned char *buffer, TSLSize length) |
TSLEntity * | operator[] (int index) |
const TSLEntity * | operator[] (int index) const |
bool | removeEntity (TSLEntity *entity) |
bool | removeEntity (Int index) |
bool | saveData (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const |
unsigned char * | saveDataToBuffer (TSLSize *length, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const |
int | size () const |
![]() | |
TSLCoord | centroid () const |
TSLEntity * | clone () const |
bool | contains (const TSLEntity *other) const |
bool | crosses (const TSLEntity *other) const |
void | alwaysMergeDifferences (bool _alwaysMergeDifferences) |
TSLEntity * | difference (const TSLEntity *other) const |
double | distance (const TSLCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const |
TSLEnvelope | envelope (int surfaceID=-1) const |
bool | equals (const TSLEntity *other) const |
TSLEntity * | intersection (const TSLEntity *other) const |
bool | intersects (const TSLEntity *other) const |
bool | intersects (const TSLEnvelope *envelope) const |
bool | move (const TSLCoord &location, const TSLCoord &reference) |
bool | overlaps (const TSLEntity *other) const |
TSLEntitySet * | parent () |
const TSLEntitySet * | parent () const |
void | renderLevel (int level) |
int | renderLevel () const |
bool | rotate (double angle, const TSLCoord *origin=NULL) |
double | rotation () const |
bool | rotation (double newValue) |
bool | scale (double scaleParam, TSLCoord *origin=0) |
bool | scaleXY (double scaleX, double scaleY, TSLCoord *origin=0) |
double | squareDistance (const TSLCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const |
double | squareDistance (const TSLEntity *otherEntity) const |
bool | touches (const TSLEntity *other) const |
bool | translate (TSLTMC xoffset, TSLTMC yoffset) |
TSLEntity * | unionWith (const TSLEntity *other) const |
bool | within (const TSLEntity *other) const |
TSLCoord | adjustedWeightedCentroid () |
reserved for future use | |
TSLCoord | centreOfGravity () |
reserved for future use | |
![]() | |
bool | addDataSet () |
bool | addDataSet (TSLDataHandler *toUseDataHandler) |
bool | clearRenderingAttributes () |
TSLDataSet * | dataSet () |
const TSLDataSet * | dataSet () const |
short | dataSourceID () const |
void | dataSourceID (short dataSourceID) |
bool | deleteDataSet () |
void | destroy () |
TSLEntityID | entityID () const |
void | entityID (TSLEntityID value) |
TSLFeatureID | featureID () const |
void | featureID (TSLFeatureID newValue) |
bool | getRendering (TSLRenderingAttributeInt attribute, int *result) const |
bool | getRendering (TSLRenderingAttributeDouble attribute, double *result) const |
bool | getRendering (TSLRenderingAttributeBool attribute, bool *result) const |
bool | getRendering (TSLRenderingAttributes &result) const |
TSL3DEntity * | is3DEntity () |
const TSL3DEntity * | is3DEntity () const |
TSLEntity * | isEntity () |
const TSLEntity * | isEntity () const |
bool | isOptimisedEntity () const |
void | name (const char *newValue) |
const char * | name () const |
void | releaseResources (int surfaceID) |
bool | setRendering (TSLRenderingAttributeInt attribute, int value) |
bool | setRendering (TSLRenderingAttributeDouble attribute, double value) |
bool | setRendering (TSLRenderingAttributeBool attribute, bool value) |
bool | setRendering (const TSLRenderingAttributes &attributes) |
void | sourceID (int value) |
int | sourceID () const |
TSLGeometryType | type () const |
void | version (TSLVersion value) |
TSLVersion | version () const |
Static Public Member Functions | |
static TSLEntitySet * | create () |
static const TSLEntitySet * | isEntitySet (const TSLEntity *entity) |
static TSLEntitySet * | isEntitySet (TSLEntity *entity) |
![]() | |
static TSLEntity * | createFromWKB (const unsigned char *wkb, unsigned int wkbLength, double TMCPerMU, double mapOffsetX=0.0, double mapOffsetY=0.0, bool multiAsEntitySet=false, double maxCurveAngle=0.0) |
static TSLEntity * | createFromWKT (const char *wkt, double TMCPerMU, double mapOffsetX=0.0, double mapOffsetY=0.0, bool multiAsEntitySet=false, double maxCurveAngle=0.0) |
Protected Member Functions | |
TSLEntitySet () | |
~TSLEntitySet () | |
![]() | |
~TSLEntity () | |
![]() | |
~TSLEntityBase () | |
|
protected |
Private constructor to prevent user creation.
|
protected |
bool TSLEntitySet::appendData | ( | const char * | filename | ) |
Appends data from the specified file.
This method allows the user to append data from the given filename into the TSLEntitySet. The data is appended at the end of the TSLEntitySet.
filename | Load data file name. |
bool TSLEntitySet::appendDataFromBuffer | ( | unsigned char * | buffer, |
TSLSize | length ) |
Loads data from the specified buffer.
This method allows the user to load data from the given buffer into the TSLEntitySet. The data is appended at the end of the TSLEntitySet.
buffer | Buffer containing data to load. |
length | Length of data in buffer. |
bool TSLEntitySet::clear | ( | ) |
This method clears the set of entities, without deleting it. Returns true if successful, false otherwise.
|
static |
Creates an empty entity set.
This call should only be used for temporary entities. For example, this call may be used to create entities that are used in the spatial tests.
Returns NULL on error.
TSLArc * TSLEntitySet::createArc | ( | TSLFeatureID | featureID, |
double | startAngle, | ||
double | endAngle, | ||
TSLTMC | cx, | ||
TSLTMC | cy, | ||
TSLTMC | radx, | ||
TSLTMC | rady = 0, | ||
double | rotation = 0 ) |
Creates an arc with the specified parameters.
Once created, the arc is added to this entity set and returned for further manipulation.
All angles are in radians, +ve anti-clockwise from the +ve X axis.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
startAngle | Angle for start of arc. |
endAngle | Angle for end of arc. If the same as startAngle, a full ellipse is drawn. |
cx | X coordinate of centre of ellipse the arc follows. |
cy | Y coordinate of centre of ellipse the arc follows. |
radx | Radius of arc along X axis, before rotation. |
rady | Radius of arc along Y axis, before rotation. If 0, rady is assumed to be the same as radx. |
rotation | Angle of rotation of arc, about cx,cy. |
TSLBorderedPolygon * TSLEntitySet::createBorderedPolygon | ( | TSLFeatureID | featureID, |
const TSLCoordSet & | coords, | ||
TSLTMC | width ) |
Creates a bordered polygon with the specified parameters.
A bordered polygon is a closed, filled feature. The outline of the polygon may optionally have extra thick edges of a specified width, Each edge may be individually be flipped inside or outside of the polygon. It must be non-complex, ie. edges must not cross. although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the bordered polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polygon. |
width | Width of thick edges. 0 is drawn as a normal polygon. All edges are initially inside the polygon. |
TSLBorderedPolygon * TSLEntitySet::createBorderedPolygon | ( | TSLFeatureID | featureID, |
TSLCoordSet * | coords, | ||
TSLTMC | width, | ||
bool | keepCoordSet = false ) |
Creates a bordered polygon with the specified parameters.
A bordered polygon is a closed, filled feature. The outline of the polygon may optionally have extra thick edges of a specified width, Each edge may be individually be flipped inside or outside of the polygon. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the bordered polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polygon. |
width | Width of thick edges. 0 is drawn as a normal polygon. All edges are initially inside the polygon. |
keepCoordSet | Flag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
Creates a clone of the specified entity.
Once created, the clone is added to this entity set and returned for further manipulation.
source | Source entity to clone. |
TSLEllipse * TSLEntitySet::createEllipse | ( | TSLFeatureID | featureID, |
TSLTMC | cx, | ||
TSLTMC | cy, | ||
TSLTMC | radx, | ||
TSLTMC | rady = 0, | ||
double | rotation = 0.0 ) |
Creates an ellipse with the specified parameters.
Once created, the ellipse is added to this entity set and returned for further manipulation.
All angles are in radians, +ve anti-clockwise from the +ve X axis.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
cx | X coordinate of centre of ellipse. |
cy | Y coordinate of centre of ellipse. |
radx | Radius of ellipse along X axis, before rotation. |
rady | Radius of ellipse along Y axis, before rotation. If 0, rady is assumed to be the same as radx. |
rotation | Angle of rotation of ellipse, about cx,cy. |
TSLEntitySet * TSLEntitySet::createEntitySet | ( | ) |
Creates an empty entity set.
Once created, the entity set is added to this entity set and returned for further manipulation.
Returns NULL on error.
TSLGeodeticArc * TSLEntitySet::createGeodeticArc | ( | TSLFeatureID | featureID, |
double | startAngle, | ||
double | endAngle, | ||
TSLTMC | cx, | ||
TSLTMC | cy, | ||
double | radx, | ||
double | rady = 0.0, | ||
double | rotation = 0 ) |
Creates a geodetic arc with the specified parameters.
Once created, the geodetic arc is added to this entity set and returned for further manipulation.
All angles are in radians, +ve anti-clockwise from the +ve X axis.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
startAngle | Angle for start of geodetic arc. |
endAngle | Angle for end of geodetic arc. If the same as startAngle, a full ellipse is drawn. |
cx | X coordinate of centre of ellipse the geodetic arc follows. |
cy | Y coordinate of centre of ellipse the geodetic arc follows. |
radx | Radius of geodetic arc along X axis, before rotation. In metres. |
rady | Radius of geodetic arc along Y axis, before rotation. In metres. If 0, rady is assumed to be the same as radx. |
rotation | Angle of rotation of geodetic arc, about the centre coordinate of ellipse. |
TSLGeodeticEllipse * TSLEntitySet::createGeodeticEllipse | ( | TSLFeatureID | featureID, |
TSLTMC | cx, | ||
TSLTMC | cy, | ||
double | radx, | ||
double | rady = 0.0, | ||
double | rotation = 0.0 ) |
Creates a new geodetic ellipse with the specified parameters.
Once created, the geodetic ellipse is added to this entity set and returned for further manipulation.
All angles are in radians, +ve anti-clockwise from the +ve X axis.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
cx | X coordinate of centre of ellipse. |
cy | Y coordinate of centre of ellipse. |
radx | Radius of ellipse along X axis, before rotation. In metres. |
rady | Radius of ellipse along Y axis, before rotation. In metres. If 0, rady is assumed to be the same as radx. |
rotation | Angle of rotation of ellipse, about centre. |
TSLGeodeticPolygon * TSLEntitySet::createGeodeticPolygon | ( | TSLFeatureID | featureID, |
const TSLCoordSet & | coords ) |
Creates a geodetic polygon with the specified parameters.
A geodetic polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the geodetic polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the geodetic polygon. |
TSLGeodeticPolygon * TSLEntitySet::createGeodeticPolygon | ( | TSLFeatureID | featureID, |
TSLCoordSet * | coords, | ||
bool | keepCoordSet = false ) |
Creates a geodetic polygon with the specified parameters.
A geodetic polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the geodetic polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the geodetic polygon. |
keepCoordSet | Flag to indicate whether the geodetic polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the geodetic polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
TSLGeodeticPolyline * TSLEntitySet::createGeodeticPolyline | ( | TSLFeatureID | featureID, |
const TSLCoordSet & | coords ) |
Creates a geodetic polyline with the specified parameters.
Once created, the polyline is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the polyline. |
TSLGeodeticPolyline * TSLEntitySet::createGeodeticPolyline | ( | TSLFeatureID | featureID, |
TSLCoordSet * | coords, | ||
bool | keepCoordSet = false ) |
Creates a geodetic polyline with the specified parameters.
Once created, the polyline is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the polyline. |
keepCoordSet | Flag to indicate whether the geodetic polyline should keep the specified coordinate set, or clone it. Note that if this flag is set, the geodetic polyline assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
TSLGeodeticSymbol * TSLEntitySet::createGeodeticSymbol | ( | TSLFeatureID | featureID, |
TSLTMC | x, | ||
TSLTMC | y, | ||
TSLTMC | height = 100, | ||
double | rotation = 0 ) |
Creates a geodetic symbol with the specified parameters.
Once created, the geodetic symbol is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
x | X coordinate of symbol position. |
y | Y coordinate of symbol position. |
height | Size of symbol in TMC units. |
rotation | Angle of rotation of symbol. Expressed in radians, +ve anti-clockwise from the +ve X axis. |
TSLGeodeticText * TSLEntitySet::createGeodeticText | ( | TSLFeatureID | featureID, |
TSLTMC | x, | ||
TSLTMC | y, | ||
const char * | value, | ||
TSLTMC | height = 100, | ||
TSLHorizontalAlignment | xalign = TSLHorizontalAlignmentCentre, | ||
TSLVerticalAlignment | yalign = TSLVerticalAlignmentMiddle, | ||
double | rotation = 0 ) |
Creates a geodetic text object with the specified parameters.
Once created, the geodetic text is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
x | X coordinate of text position. |
y | Y coordinate of text position. |
value | Text string to be displayed. |
height | Size of symbol in TMC units. |
xalign | X alignment of text. This position of the text string is placed at the x coordinate. |
yalign | Y alignment of text. This position of the text string is placed at the y coordinate. |
rotation | Angle of rotation of text. Expressed in radians, +ve anti-clockwise from the +ve X axis. |
TSLPolygon * TSLEntitySet::createPolygon | ( | TSLFeatureID | featureID, |
const TSLCoordSet & | coords ) |
Creates a polygon with the specified parameters.
A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polygon. |
TSLPolygon * TSLEntitySet::createPolygon | ( | TSLFeatureID | featureID, |
TSLCoordSet * | coords, | ||
bool | keepCoordSet = false ) |
Creates a polygon with the specified parameters.
A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross. although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
Once created, the polygon is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polygon. |
keepCoordSet | Flag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
TSLPolyline * TSLEntitySet::createPolyline | ( | TSLFeatureID | featureID, |
const TSLCoordSet & | coords ) |
Creates a polyline with the specified parameters.
Once created, the polyline is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polyline. |
TSLPolyline * TSLEntitySet::createPolyline | ( | TSLFeatureID | featureID, |
TSLCoordSet * | coords, | ||
bool | keepCoordSet = false ) |
Creates a polyline with the specified parameters.
Once created, the polyline is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing polyline. |
keepCoordSet | Flag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
TSLRectangle * TSLEntitySet::createRectangle | ( | TSLFeatureID | featureID, |
const TSLCoord & | bottomLeft, | ||
const TSLCoord & | topRight, | ||
double | rotation = 0 ) |
Creates a rectangle with the specified parameters. Rectangles are two-dimensional filled entities.
Once created, the rectangle is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
bottomLeft | Bottom left coordinate of rectangle, before rotation. |
topRight | Top right coordinate of rectangle, before rotation. |
rotation | Angle of rotation of rectangle. Expressed in radians, +ve anti-clockwise from the +ve X axis. |
TSLSymbol * TSLEntitySet::createSymbol | ( | TSLFeatureID | featureID, |
TSLTMC | x, | ||
TSLTMC | y, | ||
TSLTMC | height = 100, | ||
double | rotation = 0 ) |
Creates a symbol with the specified parameters.
Once created, the symbol is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
x | X coordinate of symbol position. |
y | Y coordinate of symbol position. |
height | Size of symbol. If the symbol is a scalable symbol, this height should be in TMC units. If the symbol is a non-scalable symbol, this height should be in pixels. |
rotation | Angle of rotation of symbol. Expressed in radians, +ve anti-clockwise from the +ve X axis. |
TSLText * TSLEntitySet::createText | ( | TSLFeatureID | featureID, |
TSLTMC | x, | ||
TSLTMC | y, | ||
const char * | value, | ||
TSLTMC | height = 100, | ||
TSLHorizontalAlignment | xalign = TSLHorizontalAlignmentCentre, | ||
TSLVerticalAlignment | yalign = TSLVerticalAlignmentMiddle, | ||
double | rotation = 0 ) |
Creates a text object with the specified parameters.
Once created, the text is added to this entity set and returned for further manipulation.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
x | X coordinate of text position. |
y | Y coordinate of text position. |
value | Text string to be displayed. |
height | Size of symbol in TMC units. |
xalign | X alignment of text. This position of the text string is placed at the x coordinate. |
yalign | Y alignment of text. This position of the text string is placed at the y coordinate. |
rotation | Angle of rotation of text. Expressed in radians, +ve anti-clockwise from the +ve X axis. |
TSLUserGeometryEntity * TSLEntitySet::createUserGeometry | ( | TSLClientUserGeometryEntity * | client, |
bool | takeOwnership = true ) |
Creates a user geometry object with the callback class provided.
Once created, the user geometry is added to this entity set and returned for further manipulation.
client | The callback class that provides the geometry logic to MapLink on request. |
takeOwnership | Specifies whether MapLink should assume ownership of the client parameter. When there is a mismatch between the compiler version used to build MapLink and the version used to build the calling code, this should always be false. |
bool TSLEntitySet::deleteBufferData | ( | unsigned char * | buffer | ) | const |
Delete the buffer returned from 'saveDataToBuffer'.
This method must be used to delete the buffer after a call to 'saveDataToBuffer'. If this does not happen then memory will be leaked.
buffer | Buffer to be deleted, returned from saveDataToBuffer. |
int TSLEntitySet::find | ( | const TSLEntity * | entity | ) | const |
Find the position of an entity within this entity set.
entity | Entity to find. |
bool TSLEntitySet::insert | ( | TSLEntity * | source, |
int | index = -1 ) |
Inserts an entity into this entity set.
The entity is placed at the specified index. If the index is out of the current range, then it is appended to the entity set.
An entity may only exist in one entity set. It is removed from its current entity set before being inserted into a new one.
source | Entity to insert into the set. |
index | Position to place entity. If this is out of range of the current entity set, then it is appended to the set. |
|
static |
Query whether the entity is an entity set.
If this entity is an entity set, returns an accessor, otherwise returns NULL.
When querying Optimised maps this query may return NULL.
entity | the entity to query |
|
static |
Query whether the entity is an entity set.
If this entity is an entity set, returns an accessor, otherwise returns NULL.
When querying Optimised maps this query may return NULL.
entity | the entity to query |
bool TSLEntitySet::loadData | ( | const char * | filename | ) |
Loads data from the specified file.
This method allows the user to load data from the given filename into the TSLEntitySet. The TSLEntitySet is cleared first.
filename | Load data file name. |
bool TSLEntitySet::loadDataFromBuffer | ( | unsigned char * | buffer, |
TSLSize | length ) |
Loads data from the specified buffer.
This method allows the user to load data from the given buffer into the TSLEntitySet. The TSLEntitySet is cleared first.
buffer | Buffer containing data to load. |
length | Length of data in buffer. |
TSLEntity * TSLEntitySet::operator[] | ( | int | index | ) |
Queries the entity at the specified index.
index | Index into set to return |
const TSLEntity * TSLEntitySet::operator[] | ( | int | index | ) | const |
Queries the read-only entity at the specified index.
index | Index into set to return |
bool TSLEntitySet::removeEntity | ( | Int | index | ) |
Removes the entity at index from the entity set and deletes it.
index | The index of the TSLEntity to remove |
bool TSLEntitySet::removeEntity | ( | TSLEntity * | entity | ) |
Removes the given entity from the entity set.
entity | The TSLEntity to remove. |
bool TSLEntitySet::saveData | ( | const char * | filename, |
TSLMapLinkVersion | ver = TSL_CURRENT_MAPLINK_VERSION ) const |
Saves data to the specified file.
This method allows the user to save the data currently loaded in the TSLEntitySet to the given filename.
filename | Save data file name. |
ver | MapLink version to save as |
unsigned char * TSLEntitySet::saveDataToBuffer | ( | TSLSize * | length, |
TSLMapLinkVersion | ver = TSL_CURRENT_MAPLINK_VERSION ) const |
Saves data to the specified buffer.
This method allows the user to save the data currently loaded in the TSLEntitySet to a buffer. It is the callers responsibility to free the buffer using the 'deleteBufferData' call.
length | Storage for length of returned buffer. |
ver | MapLink version to save as |
int TSLEntitySet::size | ( | ) | const |
Queries the size of the entity set.