![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This abstract class defines all the potential callbacks that will be sent by the TSLWMTSDataLayer when it attempts to load a Web Map Tile Service. The order of the methods is the order in which each will be called depending on the validity of the layer settings.
If the service metadata is loaded successfully then the onCapabilitiesLoaded method will be called first. Provided is a modifiable TSLWMTSServiceInfo instance. The user should set all necessary settings on the object, such as the service layers that they wish to be visible, which tile matrix sets to use, and any required layer dimensions and/or layer style values.
If the service metadata is not successfully loaded then the onCapabilitiesLoadFailure method will be called first instead. This callback can however be called later in the callback process to denote an error that was not originally determined.
Assuming the onCapabilitiesLoaded method was called, and the user does not return false to indicate a failure, the layer settings are checked in the following order:
If the user does not return false when any of the above methods are called, then the data layer will recheck the reason for the call. If the test still fails then the method will be called again, if not then the checks will continue to the next test. The user should keep this in mind as this could cause an infinite loop should the user not rectify the problem. Returning false from any of these methods will cause loading to fail and the callback loop to be cancelled.
Assuming the service loaded successfully, then the final callback will be made: onServiceSettingsComplete.
Public Types | |
enum | CapabilitiesLoadFailureReason { LoadingFailedInternetSettings = 0 , LoadingFailedLoadFailed = 1 , LoadingFailedParseFailure = 2 , LoadingFailedServiceUnsupported = 3 , LoadingFailedUnableToDetermineExtent = 4 } |
Public Member Functions | |
virtual bool | onCapabilitiesLoaded (TSLWMTSServiceInfo *serviceInfo)=0 |
virtual void | onCapabilitiesLoadFailure (CapabilitiesLoadFailureReason reason)=0 |
virtual bool | onNoVisibleLayers (TSLWMTSServiceInfo *serviceInfo)=0 |
virtual int | onChoiceOfServiceCRSs (const char **crsChoices, int noOfChoices)=0 |
virtual bool | onNoCommonCRSinVisibleLayers (TSLWMTSServiceInfo *serviceInfo)=0 |
virtual bool | onSelectedCRSNotSupported (TSLWMTSServiceInfo *serviceInfo)=0 |
virtual int | onChoiceOfRequestFormats (TSLWMTSServiceLayer *layer, const char **formatChoices, int numFormatChoices)=0 |
virtual bool | onUserLinearTransformInvalid ()=0 |
virtual bool | onServiceSettingsComplete ()=0 |
virtual | ~TSLWMTSServiceSettingsCallbacks ()=0 |
Enumeration that describes some of the potential reasons why the WMTS data layer may fail to load a service:
|
inlinepure virtual |
Additional Declarations
|
pure virtual |
This callback will be made when the service metadata has been successfully loaded. The client application should set the layer visibilities and tile matrix sets. Dimension and style values can be set as required.
NOTE: The client application should not store the value of serviceInfo. It should only be modified during a callback to the client application. If it is modified outside of one of these callbacks then the changes will either be ignored or could cause a crash.
serviceInfo | The service metadata. |
The client application should return true to continue the load, false to cancel and remove all data.
|
pure virtual |
This callback will be made if the WMTS data layer fails to load or parse the service capabilities and is intended to provide some feedback as to the reason.
|
pure virtual |
This callback will be triggered if the data layer has a choice of possible GetTile formats to choose from.
The default implementation would be to return 0, indicating the format at position 0 in the array of choices passed.
layer | The service layer |
formatChoices | An array of strings containing the format values as returned in the service metadata. The order will be the same as the service metadata after unsupported formats have been weeded out. |
numFormatChoices | The size of the array specified by the formatChoices parameter. |
The client application should return the index of the format that they wish to use. If the returned index is invalid then the load will be cancelled and all loaded data removed.
|
pure virtual |
Indicates the changes made to the layer settings under an onCapabilitiesLoaded callback left a choice of possible coordinate reference systems to use.
The default implementation would be to choose the CRS at index 0.
crsChoices | An array of strings containing the crs values. |
noOfChoices | The size of the array passed as crsChoices. |
|
pure virtual |
Indicates that the changes made to the layer settings under an onCapabilitiesLoaded callback left 2 or more layers visible, but that the selected tile matrix sets do not have a common coordinate reference system between them.
The coordinate reference system of a tile matrix set can be retrieved with TSLWMTSServiceTileMatrixSet::supportedCRS; all selected tile matrix sets (of visible layers) should have the same coordinate reference system.
serviceInfo | The service metadata. |
The client application should return true to retry the load, false to cancel and remove all data.
|
pure virtual |
Indicates the changes made to the layer settings under an onCapabilitiesLoaded callback left no layers visible.
serviceInfo | The service metadata. |
The client application should return true to retry the load, false to cancel and remove all data.
|
pure virtual |
Indicates that the changes made to the layer settings under an onCapabilitiesLoaded callback left 1 or more layers visible, but that the selected tile matrix sets' shared coordinate reference system is not supported.
serviceInfo | The service metadata. |
The client application should return true to retry the load, false to cancel and remove all data.
|
pure virtual |
This callback will be made to indicate the layer settings changed under an on CapabilitiesLoaded callback (or subsequent error callbacks) were accepted and valid. It should be overridden to tidy up any resources allocated.
The client application should return true to continue the load, false to cancel and remove all data.
|
pure virtual |
This callback will be made if the user linear transforms specified the the TSLWMTSDataLayer could not fit the entirety of the loaded data into the coordinate space.
The client application should return true to retry the load, false to cancel and remove all data.