MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLWMTSDataLayer Class Reference
Inheritance diagram for TSLWMTSDataLayer:

Detailed Description

A data layer that supports loading of version 1.0.0 OGC compliant Web Map Tile Services (WMTS).

The WMTS data layer is intended to absolve the user of the responsibility of having to specify the query parameters that are used when making requests to the WMTS. Therefore, the user does not need to specify the TILEMATRIX, TILEROW or TILECOL values that are used when making the request and instead they should provide the address of the WMTS server to the loadData method. The address URL should either be terminated with a "?" or a "&" character. E.G."http://my.host.com/wmts?" or "http://my.otherhost.com/wmts?foo=bar&".

During construction, the data layer must be provided with a user callback class instance that derives from TSLWMTSServiceSettingsCallbacks.

The user will be prompted via the callback interface for additional information should the data layer require it. The callback interface is also used, however, to set which of the WMTS layers should be visible, which tile matrix set and WMTS STYLEs to be used for each visible layer, and WMTS defined 'Dimension' values, such as a TIME parameter.

When the data layer is added to a drawing surface and a draw request is made, the WMTS data layer will then fire off requests to the WMTS service using the draw area and tile matrices that it deems suitable.

Once a successful GetTile request has been made to the WMTS, the map tile will be stored in the layer's internal cache to reduce the number of server transactions. By default this cache is 32 MB in size but can be configured via the layer's methods.

When using a TSLWMTSDataLayer with an accelerated surface the user should ensure that the setSynchronousLoading method has been called with the synchronousLoading parameter set to 'true'.

NOTE: Attempting to set a derivative of TSLFileLoader other than a TSLFileLoader Remote instance as the data layer file loader via the TSLDataLayer::addLoader method will always return false.

Transparency does not work correctly when using the X11DrawingSurface, if the data is png(24 bit) with a transparent colour index set. The transparent pixels will be drawn as their source colour, instead of transparent.

Public Member Functions

 TSLWMTSDataLayer (TSLWMTSServiceSettingsCallbacks *callbacks)
 
const char * activeCRS () const
 
void cacheFlushLimit (int flush_limit)
 
int cacheFlushLimit ()
 
void cacheSize (int new_size)
 
int cacheSize ()
 
bool clearCache ()
 
bool configurePersistentCache (const TSLPersistentCacheData *settings, TSLTileValidationFn validFn=NULL, void *arg=NULL)
 
void extentExpansion (double percent)
 
double extentExpansion () const
 
void getLinearTransformParameters (bool &automatic, double &muShiftX, double &muShiftY, double &tmcPerMU) const
 
bool getSynchronousLoading ()
 
bool getTransverseMercatorJHSFormula () const
 
void pyramidScaleFactor (double factor)
 
double pyramidScaleFactor () const
 
const TSLCoordinateSystemqueryCoordinateSystem () const
 
bool reset ()
 
const TSLWMTSServiceInfoserviceInformation () const
 
TSLWMTSServiceInfoserviceInformation ()
 
void setDefaultLoaderCallbacks (TSLLoaderAppCallback callback, void *arg, TSLAllLoadedCallback allLoadedCallback=0, void *arg2=0)
 
bool setLinearTransformParameters (bool automatic, double muShiftX, double muShiftY, double tmcPerMU)
 
void setSynchronousLoading (bool synchronousLoading)
 
void setTransverseMercatorJHSFormula (bool jhs)
 
bool synchronousLoadStrategy () const
 
void synchronousLoadStrategy (bool useSynchronousStrategy)
 
TSLTileLoadOrderStrategyEnum tileLoadOrder () const
 
void tileLoadOrder (TSLTileLoadOrderStrategyEnum strategy)
 
void useDynamicArcForWGS84 (bool useDynamicArc)
 
bool useDynamicArcForWGS84 () const
 
bool validateCache ()
 
void * operator new (size_t size) TSL_NO_THROW
 
void * operator new (size_t size, char *filename, int line)
 
void ts (int a, int b)
 
void oc (bool o)
 
- Public Member Functions inherited from TSLDataLayer
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)
 
TSLDataHandlercreateDataHandler (const char *config_file=0)
 
TSLHistoryVersion currentVersion () const
 
TSLDataHandlerdataHandler ()
 
const TSLDataHandlerdataHandler () const
 
void destroy ()
 
bool entityIsVisible (const TSLEntity *entity, const TSLDrawingSurface *drawingSurface) const
 
const TSLFeatureClassListfeatureList () const
 
const TSLFeatureClassListfeatureList (const char *detailLayerName) const
 
bool fileModificationTime (const char *filename, TSLTimeType &lastModificationTime)
 
TSLEntityfindEntity (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
 
TSLEntityIteratorgetEntityIterator (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
 
TSLFileLoadergetLoader ()
 
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)
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *featureName=NULL, int drawingSurfaceID=-1) const
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector, int drawingSurfaceID=-1) const
 
const TSLCoordinateSystemgetCoordinateSystem () 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 TSLVersionHistorySetversionHistory () const
 

Static Public Member Functions

static bool crsIsSupported (const char *crs)
 

Constructor & Destructor Documentation

◆ TSLWMTSDataLayer()

TSLWMTSDataLayer::TSLWMTSDataLayer ( TSLWMTSServiceSettingsCallbacks * callbacks)

Constructor for the TSLWMTSDataLayer

Parameters
callbacksThe user-implemented callback interface class that will be queried if the data layer has insufficient information to use the WMTS. It is also used for setting which WMTS layers should be set to visible, etc.

Member Function Documentation

◆ activeCRS()

const char * TSLWMTSDataLayer::activeCRS ( ) const

Returns the Coordinate Reference System (CRS) string that identifies the current coordinate system in use by the data layer. This can be used in conjunction with the CRS strings returned by TSLWMTSServiceTileMatrixSet::supportedCRS to identify which layers can be made visible after the callback sequence has completed.

◆ cacheFlushLimit() [1/2]

int TSLWMTSDataLayer::cacheFlushLimit ( )

Query the current flush limit.

When the cache is full the system will remove the least recently used files to make room for the new data to load. The cache flush limit indicates the number of most recently used data files that the system will try keep in memory while flushing the cache. If the system cannot free enough memory and keep the flush limit number of files it will temporarily halve the flush limit until the cache memory usage is below 90% of the allowable cache size.

Returns the current flush limit.

◆ cacheFlushLimit() [2/2]

void TSLWMTSDataLayer::cacheFlushLimit ( int flush_limit)

Sets cache flush limit.

This method allows the user to set the cache flush limit for the TSLWMTSData Layer. When the cache is full the system will remove the least recently used files to make room for the new data to load. The cache flush limit indicates the number of most recently used data files that the system will try keep in memory while flushing the cache. If the system cannot free enough memory and keep the flush limit number of files it will temporarily halve the flush limit until the cache memory usage is below 90% of the allowable cache size.

Parameters
flush_limitNumber of most recently used data files that the system will try to keep in memory while flushing the cache.

◆ cacheSize() [1/2]

int TSLWMTSDataLayer::cacheSize ( )

Query the amount of memory that the cache may currently use, in Kilobytes.

◆ cacheSize() [2/2]

void TSLWMTSDataLayer::cacheSize ( int new_size)

Set maximum size of the tile cache.

This method allows the user to set the amount of memory that the tile cache can use. To reduce the number of server transactions, the TSLWMTSDataLayer holds recent tiles in memory so that it does not need to re-request data from the WMTS every time a draw request is made. The larger the cache size the more data can be held in memory and draw requests are handled much more efficiently. However the client application must find a compromise between a large cache size and the memory requirements of the application itself.

The default tile cache is 32Mb (32768 KB)

Parameters
new_sizeAllowable size of the cache in kilobytes.

◆ clearCache()

bool TSLWMTSDataLayer::clearCache ( )

Clear the tile cache for this TSLWMTSDataLayer.

This method requests the TSLWMTSDataLayer to clear all cached data from memory. After a call to clearCache any draw operation involving the TSLWMTSDataLayer will re-load all tiles from the WMTS server.

Returns true on success, false otherwise.

◆ configurePersistentCache()

bool TSLWMTSDataLayer::configurePersistentCache ( const TSLPersistentCacheData * settings,
TSLTileValidationFn validFn = NULL,
void * arg = NULL )

Adds and configures a persistent tile cache.

A persistent tile cache may be used to speed up the loading of tiles which have been downloaded via a slow connection, eg. web-based.

A persistent tile cache works in parallel to the memory tile cache. If a tile is not found in memory, then the persistent tile cache is searched. If it is found in the persistent tile cache, then the (optional) tile validation function is called to verify that the file is up-to-date. If so, then the tile is loaded and added to the memory tile cache. If the tile is not found in the persistent tile cache, then if configured, a local search may be performed using the TSLPathList added to the TSLDataLayer. If the tile is found locally or is invalid, it is added to the memory cache and optionally to the persistent cache. If the tile is not found locally, then it may be returned in the failure list of the draw function, if specified.

Parameters
settingsA TSLPersistentCacheData object containing the settings to use for the persistent cache.
validFnThis is an optional function that may be used to validate any tiles that are in the cache, prior to them being used. If not specified, then all tiles in the cache are deemed to be valid.
argAn optional argument that will be passed to the user's validation function.
Returns
true if the cache was configured successfully, false otherwise.

◆ crsIsSupported()

static bool TSLWMTSDataLayer::crsIsSupported ( const char * crs)
static

Returns whether the given Coordinate Reference System (CRS) string is supported by MapLink, and thus whether a layer from a WMTS service that uses this CRS can be used with the TSLWMTSDataLayer.

CRS strings can be retrieved through TSLWMTSTileMatrixSet::supportedCRS() once the data layer has been connected to a service. During the callback sequence when connecting to a data layer MapLink will internally validate that the selected layers use a supported coordinate system and will not allow the use of layers that have no supported coordinate systems, so using this method is not mandatory.

This method is provided to allow an application to test whether the use of a specific CRS advertised by a TSLWMTSServiceLayer is valid while the data layer's callback sequence is still in progress, which can be useful when presenting the available layers on the service as part of a user interface.

◆ extentExpansion() [1/2]

double TSLWMTSDataLayer::extentExpansion ( ) const

Gets the percentage by which the data extent should be expanded.

Returns the percentage by which the data extent should be expanded. Should either be a non-negative value, in which case data extent expansion is turned on and the data extent is expanded by the specified percentage, or it should be -1, in which case data extent expansion is turned off. By default, data extent expansion is turned off (i.e. the initial value is -1)

◆ extentExpansion() [2/2]

void TSLWMTSDataLayer::extentExpansion ( double percent)

Sets the percentage by which the data extent should be expanded. Should either be a non-negative value, in which case data extent expansion is turned on and the data extent is expanded by the specified percentage, or it should be -1, in which case data extent expansion is turned off. By default, data extent expansion is turned off (i.e. the initial value is -1)

Parameters
percentThe percentage by which the data extent should be expanded.

◆ getLinearTransformParameters()

void TSLWMTSDataLayer::getLinearTransformParameters ( bool & automatic,
double & muShiftX,
double & muShiftY,
double & tmcPerMU ) const

This method should be used to query the linear transform that is used to convert from the WMTS layers' MU values to TMC. By default, the parameters of this transform are determined automatically by the data layer, but if the layer is to be used in conjunction with other map data, for instance from a map data layer, it may be desired to use a common transform so that all data in the drawing surface appears correctly positioned. The transform parameters may be set via the setLinearTransformParameters method.

This method may be called at any point in the lifetime of the data layer.

Parameters
automaticIf this parameter returns true then the data layer will attempt to determine a valid transform so that all visible WMTS layers will fit into the available TMC space and the remaining parameters to this method should be ignored. If set to false then the remaining parameters will be valid.
muShiftXIf the automatic parameter is set to false, then the value that this parameter will return defines the x origin for the TMC coordinate system
muShiftYIf the automatic parameter is set to false, then the value that this parameter will return defines the y origin for the TMC coordinate system
tmcPerMUIf the automatic parameter is set to false, then the value that this parameter will return defines the relationship between internal units (TMCs) and map units.

◆ getSynchronousLoading()

bool TSLWMTSDataLayer::getSynchronousLoading ( )

This method returns the current status of the synchronous loading flag.

Note: This method queries whether the map data is loaded synchronously or asynchronously and is different from the 'synchronousLoadStrategy' method contained within this class.

◆ getTransverseMercatorJHSFormula()

bool TSLWMTSDataLayer::getTransverseMercatorJHSFormula ( ) const

Queries if the Transverse Mercator JHS formula is to be used when data is in a Transverse Mercator projection.

The setting will be used to create a local Coordinate System to place the retrieved data. If the setting is changed after the layer has been configured or during layer configuration you may either end up using the USGS Snyder or JHS formula, which you end up with is undefined in these cases.

The default setting is to use the USGS Snyder formula.

Returns true if the layer is set to use the JHS formula for Transverse Mercator.

◆ oc()

void TSLWMTSDataLayer::oc ( bool o)

◆ operator new() [1/2]

void * TSLWMTSDataLayer::operator new ( size_t size)

◆ operator new() [2/2]

void * TSLWMTSDataLayer::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.

◆ pyramidScaleFactor() [1/2]

double TSLWMTSDataLayer::pyramidScaleFactor ( ) const

Returns the level at which the data layer will switch to the next tile matrix in the currently selected tile matrix set (for all service layers).

A value of 1.0 means the layer will switch when tiles in the current tile matrix would be of a lower resolution than the displayed area. Values less than 1.0 mean that tiles will be stretched to cover the relevant area, while values greater than 1.0 mean higher resolution tiles will be requested than the displayed area.

The default value is 1.4.

◆ pyramidScaleFactor() [2/2]

void TSLWMTSDataLayer::pyramidScaleFactor ( double factor)

Sets the level at which the data layer will switch to the next tile matrix in the currently selected tile matrix set (for all service layers).

A value of 1.0 means the layer will switch when tiles in the current tile matrix would be of a lower resolution than the displayed area. Values less than 1.0 mean that tiles will be stretched to cover the relevant area, while values greater than 1.0 mean higher resolution tiles will be requested than the displayed area.

The default value is 1.4.

◆ queryCoordinateSystem()

const TSLCoordinateSystem * TSLWMTSDataLayer::queryCoordinateSystem ( ) const

Query for the coordinate system used by this layer to convert between map (CRS) units and lat/long.

This method requests the layer to return a TSLCoordinateSystem object, which is only valid as long as no new service has been loaded into the layer, or until the callback loop is restarted.

◆ reset()

bool TSLWMTSDataLayer::reset ( )

Resets the visibility, dimensions and style values associated with each layer and causes the callbacks to be restarted. If the callback loop is currently running or no data is loaded then this method will return false.

NOTE: The callbacks made during this call will always be synchronous.

◆ serviceInformation() [1/2]

TSLWMTSServiceInfo * TSLWMTSDataLayer::serviceInformation ( )

Provides access to the service element of the service's capabilities, allowing for changes to be made to the data layer's configuration after the callback sequence has completed.

Applications should not store the returned pointer from this function as it will become immediately invalid following a call to loadData(), reset() or removeData().

The data layer does not enforce thread safety on access through this object, therefore an application should only modify settings in the same thread as the drawing surface containing the TSLWMTSDataLayer.

If no service has been loaded into the data layer or the callback sequence has not completed this method will return NULL.

◆ serviceInformation() [2/2]

const TSLWMTSServiceInfo * TSLWMTSDataLayer::serviceInformation ( ) const

Returns details of the service element of the service's capabilities.

If a service has not been loaded yet, null will be returned.

◆ setDefaultLoaderCallbacks()

void TSLWMTSDataLayer::setDefaultLoaderCallbacks ( TSLLoaderAppCallback callback,
void * arg,
TSLAllLoadedCallback allLoadedCallback = 0,
void * arg2 = 0 )

By default, if the user does not provide a TSLFileLoaderRemote object to the data layer, the layer will use its own internal loader. This method allows the callbacks to this internal loader to be set. Calling this method having already provided a file loader via the TSLDataLayer::addLoader will revert the file loader to the internal loader.

Parameters
callbackA callback that provides feedback on the progress of loading the layers data
argThe user value that will be provided during each call the callback function
allLoadedCallbackA callback that will be called when all of the visible tiles have been loaded. If all of the tiles are loaded from the tilecache then this callback will not be made.
arg2The user value that will be provided during each call the allLoaded Callback function

◆ setLinearTransformParameters()

bool TSLWMTSDataLayer::setLinearTransformParameters ( bool automatic,
double muShiftX,
double muShiftY,
double tmcPerMU )

This method should be used to set the linear transform that is used to convert from the WMTS layers' MU values to TMC. By default, the parameters of this transform are determined automatically by the data layer, but if the layer is to be used in conjunction with other map data, for instance from a map data layer, it may be desired to use a common transform so that all data in the drawing surface appears correctly positioned.

This method may be called either before the loadData method is made, during the onCapabilitiesLoaded or onUserLinearTransformInvalid callbacks to the TSLWMTSServiceSettingsCallback or before a reset call is made to the data layer. Calling this method during or after the onServiceSettingsComplete callback has been made will have no effect. If the linear transform parameters passed to this method will not allow all the visible WMTS data to fit into the available TMC space, then the onUserLinearTransformInvalid callback will be invoked, allowing the user to specify new transform parameters.

Parameters
automaticIf set to true then the data layer will attempt to determine a valid transform so that all visible WMTS layers will fit into the available TMC space and the remaining parameters to this method will be ignored. If set to false then the layer will use the remaining parameters.
muShiftXDefines the x origin for the TMC coordinate system
muShiftYDefines the y origin for the TMC coordinate system
tmcPerMUDefines the relationship between internal units (TMCs) and map units.
Returns
true on success, false otherwise.

◆ setSynchronousLoading()

void TSLWMTSDataLayer::setSynchronousLoading ( bool synchronousLoading)

Call with the synchronous parameter set to true to load map data synchronously, it also inhibits callbacks after each map tile is loaded.

Note: This method sets whether the map data is loaded synchronously or asynchronously and is different from the 'synchronousLoadStrategy' method contained within this class.

◆ setTransverseMercatorJHSFormula()

void TSLWMTSDataLayer::setTransverseMercatorJHSFormula ( bool jhs)

If passed true then the Transverse Mercator JHS formula will be used when using a WMS Server that provides data in a Transverse Mercator projection..

The setting will be used to create a local Coordinate System to place the retrieved data. If the setting is changed after the layer has been configured or during layer configuration you may either end up using the USGS Snyder or JHS formula, which you end up with is undefined in these cases.

The default setting is to use the USGS Snyder formula.

Parameters
jhspass true to use the JHS formula, pass false to use the USGS Snyder formula.

◆ synchronousLoadStrategy() [1/2]

bool TSLWMTSDataLayer::synchronousLoadStrategy ( ) const

Queries whether during the next load (of a service) the user callbacks will be made synchronously or asynchronously.

◆ synchronousLoadStrategy() [2/2]

void TSLWMTSDataLayer::synchronousLoadStrategy ( bool useSynchronousStrategy)

Specifies whether during the next load (of a service) the user callbacks will be made synchronously or asynchronously.

◆ tileLoadOrder() [1/2]

TSLTileLoadOrderStrategyEnum TSLWMTSDataLayer::tileLoadOrder ( ) const

Query the tile load order strategy.

The strategy determines the order that the tiles required for a particular view are requested. Refer to the documentation for the TSLTileLoadOrder StrategyEnum enumeration for details of the choices.

◆ tileLoadOrder() [2/2]

void TSLWMTSDataLayer::tileLoadOrder ( TSLTileLoadOrderStrategyEnum strategy)

Set the tile load order strategy.

The strategy determines the order that the tiles required for a particular view are requested. Refer to the documentation for the TSLTileLoadOrder StrategyEnum enumeration for details of the choices.

◆ ts()

void TSLWMTSDataLayer::ts ( int a,
int b )

◆ useDynamicArcForWGS84() [1/2]

bool TSLWMTSDataLayer::useDynamicArcForWGS84 ( ) const

Returns whether the data layer should treat EPSG:4326 and CRS:84 coordinate systems as Dynamic Arc.

If true, when the data layer is used with a WMTS server that only advertises support for the EPSG:4326 or CRS:84 coordinate system, or the application's TSLWMTSServiceSettings::onChoiceOfServiceCRSs callback implementation chooses to use either EPSG:4326 or CRS:84 the data layer will create and return a Dynamic Arc coordinate system from queryCoordinateSystem(). If false, the data layer will create and return a WGS84 coordinate system from query CoordinateSystem() in this case.

When using multiple data layers in the same drawing surface it is necessary to ensure all the layers have compatible coordinate systems in order for them to align correctly. This method allows the application to ensure that the correct type of coordinate system is used by the WMTS data layer when overlaying it on top other data layers which use either Dynamic Arc or WGS84 coordinate systems.

The default is to use a Dynamic Arc coordinate system to represent EPSG:4326 and CRS:84.

◆ useDynamicArcForWGS84() [2/2]

void TSLWMTSDataLayer::useDynamicArcForWGS84 ( bool useDynamicArc)

Controls whether the data layer should treat EPSG:4326 and CRS:84 coordinate systems as Dynamic Arc.

If true, when the data layer is used with a WMTS server that only advertises support for the EPSG:4326 or CRS:84 coordinate system, or the application's TSLWMTSServiceSettings::onChoiceOfServiceCRSs callback implementation chooses to use either EPSG:4326 or CRS:84 the data layer will create and return a Dynamic Arc coordinate system from queryCoordinateSystem(). If false, the data layer will create and return a WGS84 coordinate system from queryCoordinateSystem() in this case.

When using multiple data layers in the same drawing surface it is necessary to ensure all the layers have compatible coordinate systems in order for them to align correctly. This method allows the application to ensure that the correct type of coordinate system is used by the WMTS data layer when overlaying it on top other data layers which use either Dynamic Arc or WGS84 coordinate systems.

The default is to use a Dynamic Arc coordinate system to represent EPSG:4326 and CRS:84.

◆ validateCache()

bool TSLWMTSDataLayer::validateCache ( )

Validate the tiles in the persistent tile cache for this layer.

Returns true on success, false otherwise.