![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist data layer for the handling of user drawn data.
The Custom Data Layer allows the developer to get a handle to the TSLRenderingInterface class, thus enabling custom drawing in the drawing surface. The Custom Data Layer also allows for additional MapLink data layers to be drawn as part of the Custom Data Layer itself via an instance of the TSLCustomDataLayerHandler class.
The developer should at minimum derive from TSLClientCustomDataLayer in the application and implement the pure virtual drawLayer method. Additional methods on TSLClientCustomDataLayer may be overridden as necessary.
When using a Custom Data Layer within a drawing surface from the 3D SDK or Accelerator SDK the developer should ensure that the layer implementation is thread safe. If the data layer implementation is not thread safe a Custom Data Layer must not be shared between multiple drawing surfaces under any circumstances.
Note: If you are not using the version of Visual Studio that MapLink was built with then you need to manage the deletion of the TSLClientCustomDataLayer derived object yourself.
Public Member Functions | |
TSLCustomDataLayer () | |
TSLClientCustomDataLayer * | getClientCustomDataLayer () |
const TSLClientCustomDataLayer * | getClientCustomDataLayer () const |
void | setClientCustomDataLayer (TSLClientCustomDataLayer *client, bool ownsClient=false) |
bool | valid () const |
void * | operator new (size_t size) TSL_NO_THROW |
void * | operator new (size_t size, char *filename, int line) |
![]() | |
void | addDrawingCallback (TSLDataLayerDrawingCallback *drawingCallback) |
bool | addFeatureRendering (const char *featureName, TSLFeatureID featureID) |
bool | addLoader (TSLFileLoader *loader, TSLLoaderAppCallback callback, void *arg, TSLAllLoadedCallback allLoadedCallback=0, void *arg2=0) |
bool | addPathList (const TSLPathList *path_list) |
void | cancelFlashback () |
bool | clearFeatureRendering (const char *featureName, TSLFeatureID featureID) |
TSLDataHandler * | createDataHandler (const char *config_file=0) |
TSLHistoryVersion | currentVersion () const |
TSLDataHandler * | dataHandler () |
const TSLDataHandler * | dataHandler () const |
void | destroy () |
bool | entityIsVisible (const TSLEntity *entity, const TSLDrawingSurface *drawingSurface) const |
const TSLFeatureClassList * | featureList () const |
const TSLFeatureClassList * | featureList (const char *detailLayerName) const |
bool | fileModificationTime (const char *filename, TSLTimeType &lastModificationTime) |
TSLEntity * | findEntity (TSLTMC x, TSLTMC y, TSLTMC aperture, int depth, const char *featureName=0, int drawingSurfaceID=-1) |
bool | findFile (const char *filename, TSLSimpleString &foundPath) const |
void | flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveCallback archiveCallback, void *arg=0) |
void | flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0) |
void | flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveCallback archiveCallback, void *arg=0) |
void | flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0) |
bool | getActiveLayerName (const TSLEnvelope &extent, double screenResolution, TSLSimpleString &activeLayerName) const |
TSLEntityIterator * | getEntityIterator (const char *detailLayer, TSLSelector *selector=NULL, TSLEnvelope *extent=NULL, bool splitOptimisedPrimitives=true) |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *result) const |
TSLFileLoader * | getLoader () |
bool | getMUExtent (double *x1, double *y1, double *x2, double *y2, int drawingSurfaceID=-1) const |
bool | getTMCExtent (TSLTMC *x1, TSLTMC *y1, TSLTMC *x2, TSLTMC *y2, int drawingSurfaceID=-1) const |
bool | getUUExtent (double *x1, double *y1, double *x2, double *y2, const TSLDrawingSurface *drawingSurface) const |
bool | importHistory (TSLHistoryVersion mapVersion, TSLHistoryTimestamp timestamp, TSLHistoryImportSet *historySet) |
bool | latLongToTMC (double latitude, double longitude, TSLTMC *x, TSLTMC *y, bool local=false) const |
bool | latLongToTMC (int num, double *latitudes, double *longitudes, TSLTMC *xs, TSLTMC *ys, bool local=false) const |
TSLDataLayerTypeEnum | layerType () const |
bool | loadData (const char *filename) |
bool | loadRendering (const char *filename) |
void | notifyChanged (bool changed=true) |
TSLMapQuery * | query (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *featureName=NULL, int drawingSurfaceID=-1) const |
TSLMapQuery * | query (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector, int drawingSurfaceID=-1) const |
const TSLCoordinateSystem * | getCoordinateSystem () const |
bool | queryVersionHistory (const TSLEnvelope &extent, TSLVersionHistorySet &history) |
void | refreshFlashback () |
bool | removeData () |
void | releaseResources (int surfaceID) |
bool | saveRendering (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) |
bool | setCoordinateSystem (const TSLCoordinateSystem *coordinateSystem) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *value) |
bool | TMCToLatLong (TSLTMC x, TSLTMC y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const |
bool | TMCToLatLong (int num, TSLTMC *xs, TSLTMC *ys, double *latitudes, double *longitudes, bool local=false) const |
const TSLVersionHistorySet * | versionHistory () const |
Protected Member Functions | |
~TSLCustomDataLayer () | |
TSLCustomDataLayer (const TSLCustomDataLayer &) | |
TSLCustomDataLayer & | operator= (const TSLCustomDataLayer &customDataLayer) |
TSLCustomDataLayer::TSLCustomDataLayer | ( | ) |
Constructor for TSLCustomDataLayer.
Construct this class on the heap and use destroy() to delete it.
|
protected |
Destructor for TSLCustomDataLayer.
This is declared as protected to prevent developers from creating this on the stack. The destroy() method should be used to remove instances of this class.
|
protected |
TSLClientCustomDataLayer * TSLCustomDataLayer::getClientCustomDataLayer | ( | ) |
Returns the client custom data layer instance attached to this TSLCustomDataLayer.
const TSLClientCustomDataLayer * TSLCustomDataLayer::getClientCustomDataLayer | ( | ) | const |
Returns the client custom data layer instance attached to this TSLCustomDataLayer.
void * TSLCustomDataLayer::operator new | ( | size_t | size | ) |
Allocation override for API redirection
void * TSLCustomDataLayer::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.
|
protected |
Assignment operator.
Sets the custom data layer to be equal to that specified.
customDataLayer | Source for new custom data layer. |
void TSLCustomDataLayer::setClientCustomDataLayer | ( | TSLClientCustomDataLayer * | client, |
bool | ownsClient = false ) |
Attaches an instance of TSLClientCustomDataLayer to the TSLCustomDataLayer.
This should be used to attach a handle to the developers TSLClientCustomDataLayer derived class.
client | A pointer to a TSLClientCustomDataLayer derived class. |
ownsClient | Indicates whether the TSLCustomDataLayer owns the client. If true the attached TSLClientCustomDataLayer will be deleted when the TSLCustomDataLayer is destroyed. The default value is false. |
bool TSLCustomDataLayer::valid | ( | ) | const |
Checks if a TSLClientCustomDataLayer pointer has been attached to the class.
Returns true if it has, false otherwise.