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

Detailed Description

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 TSLCoordinateSystemcoordinateSystem () const
 
TSLDataLayerListdataLayers ()
 
void destroy ()
 
const TSLEnvelopeextent () 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)
 

Constructor & Destructor Documentation

◆ TSLOWSContextVisualizer()

TSLOWSContextVisualizer::TSLOWSContextVisualizer ( )

Member Function Documentation

◆ configureDrawingSurface()

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.

◆ coordinateSystem()

const TSLCoordinateSystem * TSLOWSContextVisualizer::coordinateSystem ( ) const

Returns the common coordinate system used by the resources in the context document.

◆ dataLayers()

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.

◆ destroy()

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.

◆ extent()

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.

◆ operator new() [1/2]

void * TSLOWSContextVisualizer::operator new ( size_t size)

Overridden allocation to redirect to MapLink

◆ operator new() [2/2]

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.

◆ visualizeContextDocument()

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.

Parameters
contextThe OWS context document to visualize
coordinateSystemAn 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.