MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLClientCustomDynamicRenderer Class Referenceabstract

Detailed Description

This class allows an application to provide dynamic custom rendering for any MapLink entity.

To create application specific Dynamic Renderers, new classes should be derived from this class, and then use an instance of it to create a new TSLDynamicRendererCustom.

Public Member Functions

virtual ~TSLClientCustomDynamicRenderer ()
 
virtual TSLClientCustomDynamicRendererclone () const =0
 
virtual bool delayedRender (TSLRenderingInterface *renderingInterface, const TSLDataHandler *dataHandler)=0
 
virtual bool getConfig (TSLSimpleString &dst) const =0
 
virtual TSLDynamicRendererAction render (const TSLEntity *entity, TSLRenderingInterface *renderingInterface, const TSLDataHandler *dataHandler, int pass, bool *morePassesRequired, TSLFeatureID *featureID)=0
 
virtual bool setConfig (const TSLSimpleString &src)=0
 
virtual int type () const =0
 

Constructor & Destructor Documentation

◆ ~TSLClientCustomDynamicRenderer()

virtual TSLClientCustomDynamicRenderer::~TSLClientCustomDynamicRenderer ( )
virtual

Virtual destructor for Custom Dynamic Renderer

Member Function Documentation

◆ clone()

virtual TSLClientCustomDynamicRenderer * TSLClientCustomDynamicRenderer::clone ( ) const
pure virtual

This method returns a clone of the TSLClientCustomDynamicRenderer. This is used when a TSLDynamicRenderCustom object is cloned by the Dynamic Renderer Factory.

◆ delayedRender()

virtual bool TSLClientCustomDynamicRenderer::delayedRender ( TSLRenderingInterface * renderingInterface,
const TSLDataHandler * dataHandler )
pure virtual

This method is triggered by MapLink when any delayed drawing should occur. This would usually be text and symbols.

Parameters
renderingInterfaceRendering Interface to allow renderer access to low-level MapLink drawing routines.
dataHandlerThe data handler of the Data Layer containing the entity. This will typically give meta information about the attributes held within the TSLDataSet of the entity.
Returns
true if something was drawn, false otherwise.

◆ getConfig()

virtual bool TSLClientCustomDynamicRenderer::getConfig ( TSLSimpleString & dst) const
pure virtual

This method, and the associated setConfig method, allow the application to persist the Dynamic Rendering configuration. If the Dynamic Renderer supports persistence, then it should implement this method by writing its configuration data to this string. The string is assumed to be null-terminated ASCII, for example an XML stream.

Care must be taken to allow for future updates by storing version information in the configuration string.

Parameters
dstString which should be used to write the configuration data.
Returns
true if the config was successfully written, false otherwise.

◆ render()

virtual TSLDynamicRendererAction TSLClientCustomDynamicRenderer::render ( const TSLEntity * entity,
TSLRenderingInterface * renderingInterface,
const TSLDataHandler * dataHandler,
int pass,
bool * morePassesRequired,
TSLFeatureID * featureID )
pure virtual

This method is triggered by MapLink when an entity should be rendered. The Custom Dynamic Renderer can use the information passed to it in order to render the entity itself.

Parameters
entityThe entity to be rendered.
renderingInterfaceRendering Interface to allow renderer access to low-level MapLink drawing routines.
dataHandlerThe data handler of the Data Layer containing the entity. This will typically give meta information about the attributes held within the TSLDataSet of the entity.
passThe current pass number - use for multi-line rendering, such as roads. Typically just passed on to the setEdgeAttributes method of the RenderingInterface.
morePassesRequiredThe renderer should set this flag true if more passes are required. Typically just passed on to the setEdgeAttributes method of the RenderingInterface. The renderer should not set this to be false, since other entities may have set it to true.
featureIDThis contains the featureID of the entity. The renderer can change the featureID for this call and if the renderer returns TSLDynamicRendererActionDefault then this featureID will be used to lookup the feature rendering for the entity.
Returns
enum defining the action that should be taken by MapLink - at its simplest, indicating whether the renderer took control of the entity.

◆ setConfig()

virtual bool TSLClientCustomDynamicRenderer::setConfig ( const TSLSimpleString & src)
pure virtual

This method, and the associated getConfig method, allow the application to persist the Dynamic Rendering. If the Dynamic Renderer supports persistence, then it should implement this method by reading its configuration data from this string. The string is assumed to be null-terminated ASCII, for example an XML stream.

Care must be taken to allow for future updates by storing version information in the configuration string.

Parameters
srcString which represents the configuration being loaded.
Returns
true if the config was successfully read, false otherwise

◆ type()

virtual int TSLClientCustomDynamicRenderer::type ( ) const
pure virtual

This method returns the 'type' of the Dynamic Renderer and can be used for casting purposes. A TSLDynamicRendererCustom will return the type of the client interface via this method, rather than its own type.

NOTE : Values in the range of 0-999 are reserved for future MapLink use.