![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist class providing additional functions for use when a TSLClientCustomDataLayer implementation is being drawn. This class is not user constructable.
This class provides a means for TSLClientCustomDataLayer derived classes to draw additional TSLDataLayers not present in a TSLDrawingSurface as part of their normal drawing.
Public Member Functions | |
bool | drawLayer (TSLDataLayer *dataLayer, const TSLEnvelope &extent, const char *layerName=NULL, const TSLCustomDataLayerProperties *layerProperties=NULL) |
const TSLDrawingSurface * | drawingSurface () const |
const TSLCustomDataLayerProperties * | dataLayerProperties () |
const TSLCustomDataLayerProperties * TSLCustomDataLayerHandler::dataLayerProperties | ( | ) |
Provides access to the data layer properties of the TSLCustomDataLayer currently being drawn in a convenient format. For information on the use of the returned TSLCustomDataLayerProperties class see the class documentation and the documentation for the TSLCustomDataLayerHandler::drawLayer() method.
The returned object is owned by MapLink and should not be deleted by the user.
const TSLDrawingSurface * TSLCustomDataLayerHandler::drawingSurface | ( | ) | const |
Returns the TSLDrawingSurface that the TSLClientCustomDataLayer implementation is being drawn to.
Note that the constness of the returned surface should not be casted away in order to access non-const methods on the drawing surface as this will result in unpredictable behaviour.
bool TSLCustomDataLayerHandler::drawLayer | ( | TSLDataLayer * | dataLayer, |
const TSLEnvelope & | extent, | ||
const char * | layerName = NULL, | ||
const TSLCustomDataLayerProperties * | layerProperties = NULL ) |
Allows a MapLink data layer to be drawn as part of the drawing of a TSLClientCustomDataLayer. A TSLDataLayer derived class is constructed and populated as normal by a TSLClientCustomDataLayer implementation and passed to this method to be drawn to the drawing surface as part of the rendering of the TSLClientCustomDataLayer. The user retains ownership of the data layer.
Data layers drawn in this fashion should not have been added to the drawing surface as this will result in the layer being drawn twice.
By default a data layer drawn in this fashion inherits the data layer properties of the TSLCustomDataLayer that draws it. This can be overridden by passing a TSLCustomDataLayerProperties instance containing the desired data layer properties in the layerProperties argument.
dataLayer | The TSLDataLayer to draw to the drawing surface containing the TSLCustomDataLayer. The user retains ownership of this data layer. |
extent | The extent in TMCs of the data layer to draw. In most cases this will be the same as the TSLEnvelope passed to the TSLClientCustomDataLayer::drawLayer() method. |
layerName | The name of the layer being drawn. Defaults to NULL, meaning the layer inherits the name of the parent TSLCustomDataLayer given when it was added to the drawing surface, |
layerProperties | An instance of the TSLCustomDataLayerProperties class that defines the data layer properties to use when drawing the layer. For information on the available properties see the documentation for the TSLPropertyEnum enumeration. The user retains ownership of this object. Defaults to NULL, meaning the layer uses the properties of the parent TSLCustomDataLayer. |