|
CartoType API
|
#include <cartotype_map_data.h>
Public Member Functions | |
| CT_IMPORT | CMemoryMapDataBase () |
| CT_IMPORT TResult | AppendLayerByName (const MString &aLayerName) |
| CT_IMPORT TResult | AppendPointObject (int32 aLayerIndex, const TPoint &aPoint, const MString *aLabel, uint32 aId, const TMapAttribute *aAttribute=NULL, int32 aAttributes=0) |
| CT_IMPORT TResult | AppendLineObject (int32 aLayerIndex, const MPath &aPath, const MString *aLabel, uint32 aId, const TMapAttribute *aAttribute=NULL, int32 aAttributes=0) |
| CT_IMPORT TResult | AppendPolygonObject (int32 aLayerIndex, const MPath &aPath, const MString *aLabel, uint32 aId, const TMapAttribute *aAttribute=NULL, int32 aAttributes=0) |
| CT_IMPORT TResult | AppendObject (int32 aLayerIndex, const CMapObject &aObject, int32 aCircleRadius) |
| CT_IMPORT void | Clear () |
| CT_IMPORT int32 | Delete (uint32 aStartId, uint32 aEndId) |
| CT_IMPORT int32 | DeleteAllObjectsInLayer (const MString &aLayerName) |
| CT_IMPORT void | RecalculateExtent () |
| int32 | MapObjects () const |
| const CBasicMapObject & | MapObject (int aIndex) const |
| CBasicMapObject & | MapObject (int aIndex) |
| CMapDataContext * | NewContext (TResult &aError) |
A map database that holds map objects in memory. This class is used to hold highlighted objects and other temporary objects like pushpins, or any other map objects not stored in the main database.
| CT_EXPORT CMemoryMapDataBase::CMemoryMapDataBase | ( | ) |
Create an empty memory-resident map database.
Append a new layer with no attributes to a memory-resident map database, specifying the layer by name. Add an attribute called Type, or RoadType if the layer name is 'road'.
| CT_EXPORT TResult CMemoryMapDataBase::AppendLineObject | ( | int32 | aLayerIndex, |
| const MPath & | aPath, | ||
| const MString * | aLabel, | ||
| uint32 | aId, | ||
| const TMapAttribute * | aAttribute = NULL, |
||
| int32 | aAttributes = 0 |
||
| ) |
Append a line object to a memory-resident map database,
| CT_EXPORT TResult CMemoryMapDataBase::AppendObject | ( | int32 | aLayerIndex, |
| const CMapObject & | aObject, | ||
| int32 | aCircleRadius | ||
| ) |
Append an arbitrary map object to a memory-resident map database. If the object is a point, and aCircleRadius is greater than zero, convert it to a circle of the specified radius.
| CT_EXPORT TResult CMemoryMapDataBase::AppendPointObject | ( | int32 | aLayerIndex, |
| const TPoint & | aPoint, | ||
| const MString * | aLabel, | ||
| uint32 | aId, | ||
| const TMapAttribute * | aAttribute = NULL, |
||
| int32 | aAttributes = 0 |
||
| ) |
Append a point object to a memory-resident map database,
| CT_EXPORT TResult CMemoryMapDataBase::AppendPolygonObject | ( | int32 | aLayerIndex, |
| const MPath & | aPath, | ||
| const MString * | aLabel, | ||
| uint32 | aId, | ||
| const TMapAttribute * | aAttribute = NULL, |
||
| int32 | aAttributes = 0 |
||
| ) |
Append a polygon object to a memory-resident map database,
| CT_EXPORT void CMemoryMapDataBase::Clear | ( | ) |
Delete all the map objects in the database and set the extent to nothing. Do not delete or change the layers or any other data.
| CT_EXPORT int32 CMemoryMapDataBase::Delete | ( | uint32 | aStartId, |
| uint32 | aEndId | ||
| ) |
Delete all map objects with IDs in the range aStartId and aEndId inclusive. Return the number of objects deleted.
| CT_EXPORT int32 CMemoryMapDataBase::DeleteAllObjectsInLayer | ( | const MString & | aLayerName | ) |
Delete all map objects in the specified layer.
| const CBasicMapObject& CartoType::CMemoryMapDataBase::MapObject | ( | int | aIndex | ) | const [inline] |
Return a const reference to a map object in the database, selecting it by index.
| CBasicMapObject& CartoType::CMemoryMapDataBase::MapObject | ( | int | aIndex | ) | [inline] |
Return a non-const reference to a map object in the database, selecting it by index.
| int32 CartoType::CMemoryMapDataBase::MapObjects | ( | ) | const [inline] |
Return the number of map objects in the database.
| CT_EXPORT void CMemoryMapDataBase::RecalculateExtent | ( | ) |
Recalculate the extent: the bounding rectangle of all the objects in the database. For use if objects in the database have been modified directly.
1.7.5.1