![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class can be used to create and configure a set of MapLink data layers to display the contents of a context document.
Public Member Functions | |
TSLOWSContextVisualizer () | |
bool | configureDrawingSurface (TSLDrawingSurface *drawingSurface) |
const TSLCoordinateSystem * | coordinateSystem () const |
TSLDataLayerList * | dataLayers () |
void | destroy () |
const TSLEnvelope & | extent () const |
bool | visualizeContextDocument (const TSLOWSContext *context, const TSLCoordinateSystem *coordinateSystem=NULL) |
void * | operator new (size_t size) TSL_NO_THROW |
void * | operator new (size_t size, char *filename, int line) |
TSLOWSContextVisualizer::TSLOWSContextVisualizer | ( | ) |
bool TSLOWSContextVisualizer::configureDrawingSurface | ( | TSLDrawingSurface * | drawingSurface | ) |
Adds all data layers in the visualizer to the given drawing surface, and sets the surface's view extent to match the area of interest from the context document.
Note that this method does not remove any existing data layers from the drawing surface.
Returns true if the surface was successfully configured, or false if there are no layers present in the visualizer or the coordinate system from the drawing surface's current coordinate providing layer is incompatible with the coordinate system used by the visualizer.
const TSLCoordinateSystem * TSLOWSContextVisualizer::coordinateSystem | ( | ) | const |
Returns the common coordinate system used by the resources in the context document.
TSLDataLayerList * TSLOWSContextVisualizer::dataLayers | ( | ) |
Returns the list of data layers created to visualise the context document.
To view the data layers created from the context document an application can either use the configureDrawingSurface method to automatically add the layers to the drawing surface and set up its view extent to match the area of interest from the context document, or the application can do this manually by querying the data layers from the data layer list.
The visualizer retains ownership of the data layers, however applications can safely take ownership of individual layers using TSLDataLayer List::remove().
All data layers within the list that use an internal cache use their default cache size. In most cases an application should increase these sizes for best runtime performance.
void TSLOWSContextVisualizer::destroy | ( | ) |
Destroy method for context documents. This should be called rather than deleting the object as the calls are redirected internally to MapLink.
const TSLEnvelope & TSLOWSContextVisualizer::extent | ( | ) | const |
Returns the intended display extent of the context document in TMCs, suitable for use in conjunction with a MapLink drawing surface. The envelope is defined in the coordinate system returned by the coordinateSystem() method.
void * TSLOWSContextVisualizer::operator new | ( | size_t | size | ) |
Overridden allocation to redirect to MapLink
void * TSLOWSContextVisualizer::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.
bool TSLOWSContextVisualizer::visualizeContextDocument | ( | const TSLOWSContext * | context, |
const TSLCoordinateSystem * | coordinateSystem = NULL ) |
Reads the given context document and creates a set of MapLink data layers that will display each of the resources present in their document using their configured states.
Calling this method more than once will delete and replace any data layers present in the visualizer.
Note that using this method requires that no data layers have been manually removed from the visualizer's data layer list.
context | The OWS context document to visualize |
coordinateSystem | An optional coordinate system that defines the desired coordinate system for the display. Created visualizations will be compatible with this coordinate system. If no coordinate system is provided, the visualizer will create one. |