![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class represents a layer in the WMTS service metadata. It is not user-creatable but instead can either be retrieved from a TSLWMTSDataLayer, that has a service loaded, or is provided by most of the callbacks on the TSLWMTSServiceSettingsCallbacks abstract class.
Changing the settings on this class should only take place during the user callbacks, when an instance is passed to a user-derived TSLWMTSServiceSettingsCallbacks class. The callbacks will be fired once a service has been loaded on to the TSLWMTSDataLayer.
Public Member Functions | |
const char * | getAbstractAt (int index) const |
const char * | getAdditionalPrefixParameters () const |
const char * | getCurrentImageFormat () const |
const TSLWMTSServiceDimension * | getDimensionAt (int index) const |
const char * | getDimensionValue (const char *dimensionIdentifier) const |
const char * | getImageFormatAt (int index) const |
bool | getLatLonBoundingBox (double &westBoundLongitude, double &eastBoundLongitude, double &southBoundLatitude, double &northBoundLatitude) const |
const TSLWMTSServiceStyle * | getStyleAt (int index) const |
const char * | getStyleValue () const |
const TSLWMTSServiceTileMatrixSet * | getTileMatrixSetAt (int index) const |
const char * | getTitleAt (int index) const |
bool | getTMCExtent (TSLTMC &minX, TSLTMC &minY, TSLTMC &maxX, TSLTMC &maxY) const |
bool | getVisibility () const |
int | getVisibilityOrderIndex () const |
const char * | identifier () const |
int | numAbstracts () const |
int | numDimensions () const |
int | numImageFormats () const |
int | numStyles () const |
int | numTileMatrixSets () const |
int | numTitles () const |
int | selectedTileMatrixSet () const |
bool | selectTileMatrixSet (int index) |
void | setAdditionalPrefixParameters (const char *prefix) |
bool | setDimensionValue (const char *dimensionIdentifier, const char *value) |
bool | setImageFormat (const char *format) |
bool | setStyleValue (const char *styleIdentifier) |
bool | setVisibility (bool visible, int visibilityOrderIndex=-1) |
bool | supportsCRS (const char *crs) const |
Static Public Member Functions | |
static bool | layersHaveCompatibleCRS (const TSLWMTSServiceLayer **layers, int numLayers) |
const char * TSLWMTSServiceLayer::getAbstractAt | ( | int | index | ) | const |
Queries the Nth abstract defined by the service.
index | The index of the abstract defined by the service - use the num Abstracts function to find the range of valid values. |
const char * TSLWMTSServiceLayer::getAdditionalPrefixParameters | ( | ) | const |
Returns the additional URL parameters that will be passed as part of each request to the server. The string will be passed verbatim, between the '?' and the first parameter (i.e. "...?[here]server=WMTS&...").
const char * TSLWMTSServiceLayer::getCurrentImageFormat | ( | ) | const |
Returns the current image format that will be used in requests to the service for this layer. If no request format has yet been set through either the data layer's callback sequence or the setImageFormat() method, this method returns NULL.
const TSLWMTSServiceDimension * TSLWMTSServiceLayer::getDimensionAt | ( | int | index | ) | const |
This method is used to query the dimensions defined for this layer.
index | The index of the dimension - use the numDimensions function to find the range of valid values. |
On success, this method will return the dimension's metadata. On failure, for instance due to the index being out of range, then null will be returned.
const char * TSLWMTSServiceLayer::getDimensionValue | ( | const char * | dimensionIdentifier | ) | const |
This method returns the value that the data layer will use/used to request map tiles for the queried layer dimension.
dimensionIdentifier | The name of the layer dimension to query. |
This method will return null of either the dimension name does not match a dimension defined for this layer or if no value has been assigned to that dimension. If a value has been assigned to that dimension then it will be returned.
const char * TSLWMTSServiceLayer::getImageFormatAt | ( | int | index | ) | const |
Returns the Nth image format available for this layer.
bool TSLWMTSServiceLayer::getLatLonBoundingBox | ( | double & | westBoundLongitude, |
double & | eastBoundLongitude, | ||
double & | southBoundLatitude, | ||
double & | northBoundLatitude ) const |
Gets latitude/longitude bounding box defined for the WMTS layer
westBoundLongitude | This will be populated with the west-most bounding longitude. |
eastBoundLongitude | This will be populated with the east-most bounding longitude. |
southBoundLatitude | This will be populated with the south-most bounding latitude. |
northBoundLatitude | This will be populated with the north-most bounding latitude. |
If the layer defines a lat/long bounding box then the provided parameters will be populated and true returned, false otherwise.
const TSLWMTSServiceStyle * TSLWMTSServiceLayer::getStyleAt | ( | int | index | ) | const |
This method is used to query the styles defined for this layer.
index | The index of the style - use the numStyles function to find the range of valid values. |
On success, this method will return the style's metadata. On failure, for instance due to the index being out of range, then null will be returned.
const char * TSLWMTSServiceLayer::getStyleValue | ( | ) | const |
Queries the style that will be passed to the service for each tile for this layer.
The value of this property can be set via the setStyleValue method. If no style has been set and the service defines a default style for the layer this method will return the default style value.
const TSLWMTSServiceTileMatrixSet * TSLWMTSServiceLayer::getTileMatrixSetAt | ( | int | index | ) | const |
This method is used to query the tile matrix set links defined for this layer.
index | The index of the tile matrix set link - use the numTileMatrixSets function to find the range of valid values. |
On success, this method will return the metadata of the linked-to tile matrix set, along with the limits defined in the tile matrix set link. On failure, for instance due to the index being out of range, then null will be returned.
const char * TSLWMTSServiceLayer::getTitleAt | ( | int | index | ) | const |
Queries the Nth title defined by the service.
index | The index of the title defined by the service - use the numTitles function to find the range of valid values. |
bool TSLWMTSServiceLayer::getTMCExtent | ( | TSLTMC & | minX, |
TSLTMC & | minY, | ||
TSLTMC & | maxX, | ||
TSLTMC & | maxY ) const |
Returns the TMC extent of this layer based on the coordinate system in use by the owning TSLWMTSDataLayer.
If the layer's callback sequence has not finished, this method will return false.
bool TSLWMTSServiceLayer::getVisibility | ( | ) | const |
Queries if the layer is visible.
int TSLWMTSServiceLayer::getVisibilityOrderIndex | ( | ) | const |
Queries the position that this layer appears in the visible layer stack. The visible layer stack defines the z-order in which layers appear. A zero position in the stack indicates the that layer will appear at the bottom.
If the layer is not visible then this method will return -1.
Use setVisibility to modify the visibility order of service layers.
NOTE: The visibility order returned is only valid while no changes are made to the visibility of this or any other service layer.
const char * TSLWMTSServiceLayer::identifier | ( | ) | const |
Returns the identifier (name) associated with the layer via the service metadata.
|
static |
This method can be used to determine if a set of layers advertised from a WMTS have one or more compatible coordinate systems, and thus can be displayed simultaneously in the data layer.
The data layer will internally ensure that visible layers have a compatible coordinate system, so the use of this method is not required. This method is mainly useful for identifying and presenting valid combinations of layers as part of a user interface.
layers | An array of TSLWMTSServiceLayers to check for CRS compatibility |
numLayers | The number of layers in the layers array. |
int TSLWMTSServiceLayer::numAbstracts | ( | ) | const |
Returns the number of abstracts defined by the service.
int TSLWMTSServiceLayer::numDimensions | ( | ) | const |
The number of dimensions defined by the service for this layer.
int TSLWMTSServiceLayer::numImageFormats | ( | ) | const |
The number of image formats defined by the service for this layer.
int TSLWMTSServiceLayer::numStyles | ( | ) | const |
The number of styles defined by the service for this layer.
int TSLWMTSServiceLayer::numTileMatrixSets | ( | ) | const |
Returns the number of tile matrix set links defined by the service for this layer.
int TSLWMTSServiceLayer::numTitles | ( | ) | const |
Returns the number of titles defined by the service.
int TSLWMTSServiceLayer::selectedTileMatrixSet | ( | ) | const |
Queries the index of the tile matrix set link that will be passed to the service for this layer (or -1, meaning unset).
The value of this property should be set via the selectTileMatrixSet method.
bool TSLWMTSServiceLayer::selectTileMatrixSet | ( | int | index | ) |
Sets which tile matrix set link to use for this layer.
index | The index of the tile matrix set link to use, using the same indices as getTileMatrixSetAt. Use the numTileMatrixSets function to find the range of valid values. |
void TSLWMTSServiceLayer::setAdditionalPrefixParameters | ( | const char * | prefix | ) |
Sets additional URL parameters to pass as part of each request to the server. The provided string is passed verbatim, between the '?' and the first parameter (i.e. "...?[here]server=WMTS&...").
prefix | The string to insert. |
bool TSLWMTSServiceLayer::setDimensionValue | ( | const char * | dimensionIdentifier, |
const char * | value ) |
Sets the value that the data layer will send to the service for the corresponding dimension.
dimensionIdentifier | The name of dimension to set the value of |
dimensionValue | The value to set. |
bool TSLWMTSServiceLayer::setImageFormat | ( | const char * | format | ) |
Sets the image format that the data layer will use when requesting tiles from this layer from the service.
format | The format to use. |
bool TSLWMTSServiceLayer::setStyleValue | ( | const char * | styleIdentifier | ) |
Sets the name of the style that the data layer will send to the service for this layer.
styleIdentifier | The name of the style to use. Null is a valid value, to set the style to the default. |
bool TSLWMTSServiceLayer::setVisibility | ( | bool | visible, |
int | visibilityOrderIndex = -1 ) |
Set the visibility of this layer according to the following rules which are applied in order:
If visibilityOrderIndex is less than 0 or greater than the number of currently visible layers, then the layer will appear as the top-most visible layer else it will appear in the visibility order at the index specified.
visible | Indicates of the layer should be visible |
visibilityOrderIndex | Ignored if visible != true. Indicates the order the layer should appear in the layer stack. |
bool TSLWMTSServiceLayer::supportsCRS | ( | const char * | crs | ) | const |
Convenience method that returns true if the given Coordinate Reference System (CRS) string matches one of the coordinate systems supported by this layer. This method is equivalent to looping through all TSLWMTSServiceTile MatrixSets on this layer and comparing their CRS strings to the given string.
crs | The CRS string to match. |