![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class represents a layer in the WMS service metadata. It is not user-creatable but instead can either be retrieved from a TSLWMSDataLayer, that has a service loaded, or is provided by most of the callbacks on the TSLWMSServiceSettingsCallbacks abstract class.
Public Member Functions | |
const char * | abstract () const |
const char * | getBoundingBoxAt (int index, double &minX, double &minY, double &maxX, double &maxY, double **resX=0, double **resY=0) const |
const char * | getCRSAt (int index) const |
const char * | getDataAuthorityAt (int index, const char **href) const |
const char * | getDataLocationAt (int index, const char **format) const |
const TSLWMSServiceLayerDimension * | getDimensionAt (int index) const |
const char * | getDimensionValue (const char *dimensionName) const |
const char * | getDimensionValue (int index) const |
const char * | getExtentAt (int index, const char **value=0, const char **defaultValue=0, bool *nearestValue=0, bool *multipleValues=0, bool *current=0) const |
const char * | getFeatureListLocationAt (int index, const char **format) const |
const char * | getIdentifierAt (int index, const char **value) const |
const char * | getKeywordAt (int index) const |
bool | getLatLonBoundingBox (double &westBoundLongitude, double &eastBoundLongitude, double &southBoundLatitude, double &northBoundLatitude) const |
const char * | getMetadataLocationAt (int index, const char **format, const char **type) const |
const TSLWMSServiceLayer * | getParentLayer () const |
TSLWMSServiceLayer * | getParentLayer () |
const char * | getStyleAt (int index) const |
const char * | getStyleValue () const |
const TSLWMSServiceLayer * | getSubLayerAt (int index) const |
TSLWMSServiceLayer * | getSubLayerAt (int index) |
bool | getTMCExtent (TSLTMC &minX, TSLTMC &minY, TSLTMC &maxX, TSLTMC &maxY) const |
bool | getVisibility (bool *isDerived=0) const |
int | getVisibilityOrderIndex () const |
const char * | name () const |
int | noOfBoundingBoxes () const |
int | noOfCRSs () const |
int | noOfDataAuthorities () const |
int | noOfDataLocations () const |
int | noOfDimensions () const |
int | noOfExtents () const |
int | noOfFeatureListLocations () const |
int | noOfIdentifiers () const |
int | noOfKeywords () const |
int | noOfMetadataLocations () const |
int | noOfStyles () const |
int | noOfSubLayers () const |
bool | provider (const char **title, const char **url, const char **logoURL, const char **logoFormat, const int **logoWidth, const int **logoHeight) const |
bool | setDimensionValue (const char *dimensionName, const char *value) |
bool | setDimensionValue (int index, const char *value) |
bool | setStyleValue (const char *styleName) |
bool | setVisibility (bool visible, int visibilityOrderIndex=-1) |
bool | supportsCRS (const char *crs) const |
const char * | title () const |
Static Public Member Functions | |
static bool | layersHaveCompatibleCRS (const TSLWMSServiceLayer **layers, int numLayers) |
const char * TSLWMSServiceLayer::abstract | ( | ) | const |
Queries the layer abstract defined by the service
Returns the abstract if one is defined or null on error or if no abstract is defined.
const char * TSLWMSServiceLayer::getBoundingBoxAt | ( | int | index, |
double & | minX, | ||
double & | minY, | ||
double & | maxX, | ||
double & | maxY, | ||
double ** | resX = 0, | ||
double ** | resY = 0 ) const |
Gets Nth bounding box defined for the WMS layer
index | The index of the bounding box - use the noOfBoundingBoxes function to find the range |
minX | This will be populated with the minimum x value in map units |
minY | This will be populated with the minimum y value in map units |
maxX | This will be populated with the maximum x value in map units |
maxY | This will be populated with the maximum y value in map units |
resX | If defined by the service, this will be set to point at the x resolution of the layer. If the layer does not provide this value, then it will be set to NULL. |
resY | If defined by the service, this will be set to point at the y resolution of the layer. If the layer does not provide this value, then it will be set to NULL. |
const char * TSLWMSServiceLayer::getCRSAt | ( | int | index | ) | const |
Gets the Nth Coordinate Reference System that can be used with this layer.
const char * TSLWMSServiceLayer::getDataAuthorityAt | ( | int | index, |
const char ** | href ) const |
Queries the Nth data authority defined by the service.
index | The index of the data authority to query |
href | This will get populated with the href of the data authority link |
const char * TSLWMSServiceLayer::getDataLocationAt | ( | int | index, |
const char ** | format ) const |
Queries the Nth data location defined by the service.
index | The index of the data location to query. |
format | This will get populated with the format of the data location link |
const TSLWMSServiceLayerDimension * TSLWMSServiceLayer::getDimensionAt | ( | int | index | ) | const |
Returns the Nth dimension that can be set on this layer.
index | The index of the dimension - use the noOfDimensions function to find the range of valid values. |
const char * TSLWMSServiceLayer::getDimensionValue | ( | const char * | dimensionName | ) | const |
This method returns the value that the data layer will use/used to request map tiles for the queried layer dimension.
dimensionName | The name of layer dimension to query. |
This method will return null if either the dimension name does not match a dimension defined for this layer or if no value has been assigned to that dimension and the service does not specify a default value for the dimension. Otherwise it will return either the value set for the dimension via setDimensionValue, or if no value has been set it will return the default value.
const char * TSLWMSServiceLayer::getDimensionValue | ( | int | index | ) | const |
This method returns the value that the data layer will use/used to request map tiles for the queried layer dimension.
index | The index of the dimension. Valid values are between 0 and noOfDimensions() - 1. |
This method will return null if the index is invalid, or if no value has been set for the dimension and the service does not specify a default value for the dimension. Otherwise it will return either the value set for the dimension via setDimensionValue, or if no value has been set it will return the default value.
const char * TSLWMSServiceLayer::getExtentAt | ( | int | index, |
const char ** | value = 0, | ||
const char ** | defaultValue = 0, | ||
bool * | nearestValue = 0, | ||
bool * | multipleValues = 0, | ||
bool * | current = 0 ) const |
Queries the service advertised dimension extent information.
index | The extent information to query - the user can find the range of valid values using the noOfExtents function |
value | The extent range |
defaultValue | If the service advertises a default value for this dimension, then this value will be pointed at that value. If not then this will be set to null. |
nearestValue | If the service advertises whether user specified values will be snapped to the nearest value then this value will be populated with that value. If not then this will be set to the standard defined default of false. |
multipleValues | If the service advertises whether the user can specify multiple values then this value will be populated with that value. If not then this will be set to the standard defined default of false. |
current | If the service advertises whether the dimension refers to temporal data that is normally kept current and that the request parameter may include the keyword 'current' instead of an ending value, then this value will be populated with that value. If not then this will be set to the standard defined default of false. |
On success, this method will return the name of the extent (which will match the corresponding dimension). On failure, for instance due to the index being out of range, then null will be returned.
const char * TSLWMSServiceLayer::getFeatureListLocationAt | ( | int | index, |
const char ** | format ) const |
Queries the Nth data location defined by the service.
index | The index of the feature list defined by the service |
format | This will get populated with the format of the feature list link |
const char * TSLWMSServiceLayer::getIdentifierAt | ( | int | index, |
const char ** | value ) const |
Queries the Nth identifier defined by the service.
index | The index of the feature list defined by the service |
value | This will get populated with the value of the identifier |
const char * TSLWMSServiceLayer::getKeywordAt | ( | int | index | ) | const |
Queries the Nth keyword defined by the service.
index | The index of the keyword defined by the service |
bool TSLWMSServiceLayer::getLatLonBoundingBox | ( | double & | westBoundLongitude, |
double & | eastBoundLongitude, | ||
double & | southBoundLatitude, | ||
double & | northBoundLatitude ) const |
Gets latitude/longitude bounding box defined for the WMS 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 char * TSLWMSServiceLayer::getMetadataLocationAt | ( | int | index, |
const char ** | format, | ||
const char ** | type ) const |
Queries the Nth metadata location defined by the service.
index | The index of the metadata location defined by the service |
format | This will get populated with the format of the metadata |
type | This will get populated with the type of the metadata |
TSLWMSServiceLayer * TSLWMSServiceLayer::getParentLayer | ( | ) |
Returns the parent layer of this layer, or NULL if this is the root service layer.
const TSLWMSServiceLayer * TSLWMSServiceLayer::getParentLayer | ( | ) | const |
Returns the parent layer of this layer, or NULL if this is the root service layer.
const char * TSLWMSServiceLayer::getStyleAt | ( | int | index | ) | const |
Gets the Nth style that can be set on this layer.
const char * TSLWMSServiceLayer::getStyleValue | ( | ) | const |
Queries the style that will be passed to the service for each tile for this layer.
The value of this property should be set via the setStyleValue method.
TSLWMSServiceLayer * TSLWMSServiceLayer::getSubLayerAt | ( | int | index | ) |
Gets the Nth sub layer of this layer.
const TSLWMSServiceLayer * TSLWMSServiceLayer::getSubLayerAt | ( | int | index | ) | const |
Gets the Nth sub layer of this layer.
bool TSLWMSServiceLayer::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 TSLWMSDataLayer.
If the layer's callback sequence has not finished, this method will return false.
bool TSLWMSServiceLayer::getVisibility | ( | bool * | isDerived = 0 | ) | const |
Queries if the layer is visible.
This method will return true of either the layer is directly visible or visible because one of its parent layers are visible. To determine the reason for the layer being visible, pass a valid value for the isDerived parameter.
isDerived | Will be set to true if the layer is not directly visible, but is visible through one of its parents. It will be set to false in all other cases. |
int TSLWMSServiceLayer::getVisibilityOrderIndex | ( | ) | const |
Queries the position that this layer appears in the visible layer stack. The visible layer stack defines the order in which layers are requested from the service. A zero position in the stack indicates the that layer is requested first, meaning the layer will appear at the bottom.
If the layer is not directly visible (it may be visible indirectly through a parent layer) then this method will return -1.
NOTE: The visibility order returned is only valid while not changes are made to the visibility of this or any other service layer.
|
static |
This method can be used to determine if a set of layers advertised from a WMS 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 TSLWMSServiceLayers to check for CRS compatibility |
numLayers | The number of layers in the layers array. |
const char * TSLWMSServiceLayer::name | ( | ) | const |
If the service metadata defines a name for this layer, then this method will return it. Otherwise it will return false.
int TSLWMSServiceLayer::noOfBoundingBoxes | ( | ) | const |
The number of bounding boxes defined by the service for this layer.
int TSLWMSServiceLayer::noOfCRSs | ( | ) | const |
The number of Coordinate Reference Systems defined by the service for this layer.
int TSLWMSServiceLayer::noOfDataAuthorities | ( | ) | const |
Returns the number of data authorities defined by the service
int TSLWMSServiceLayer::noOfDataLocations | ( | ) | const |
Returns the number of data locations defined by the service
int TSLWMSServiceLayer::noOfDimensions | ( | ) | const |
The number of dimensions defined by the service for this layer.
int TSLWMSServiceLayer::noOfExtents | ( | ) | const |
The number of dimension extents defined by the service for this layer.
int TSLWMSServiceLayer::noOfFeatureListLocations | ( | ) | const |
Returns the number of feature list locations defined by the service
int TSLWMSServiceLayer::noOfIdentifiers | ( | ) | const |
Returns the number of identifiers defined by the service
int TSLWMSServiceLayer::noOfKeywords | ( | ) | const |
Returns the number of keywords defined by the service
int TSLWMSServiceLayer::noOfMetadataLocations | ( | ) | const |
Returns the number of metadata locations defined by the service
int TSLWMSServiceLayer::noOfStyles | ( | ) | const |
The number of styles defined by the service for this layer.
int TSLWMSServiceLayer::noOfSubLayers | ( | ) | const |
The number of sub layers defined by the service for this layer.
bool TSLWMSServiceLayer::provider | ( | const char ** | title, |
const char ** | url, | ||
const char ** | logoURL, | ||
const char ** | logoFormat, | ||
const int ** | logoWidth, | ||
const int ** | logoHeight ) const |
Queries the layer attribution/provider defined by the service.
title | This will get populated with the title of the provider if one is defined |
url | This will get populated with the url of the provider if one is defined |
logoURL | This will get populated with the logo url if one is defined |
logoFormat | This will get populated with the logo format if one is defined |
logoWidth | This will get populated with the logo width if one is defined |
logoHeight | This will get populated with the logo height r if one is defined |
bool TSLWMSServiceLayer::setDimensionValue | ( | const char * | dimensionName, |
const char * | value ) |
Sets the value that the data layer will send to the service for the corresponding dimension.
dimensionName | The name of dimension to set the value of |
value | The value to set. |
bool TSLWMSServiceLayer::setDimensionValue | ( | int | index, |
const char * | value ) |
Sets the value that the data layer will send to the service for the corresponding dimension.
index | The index of the dimension to set the value of. |
value | The value to set. |
bool TSLWMSServiceLayer::setStyleValue | ( | const char * | styleName | ) |
Sets the name of the style that the data layer will send to the service for this layer.
styleName | The name of the style to use. Null is a valid value to set the style to the default. |
bool TSLWMSServiceLayer::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 TSLWMSServiceLayer::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 values returned from getCRSAt and comparing them to the given string.
crs | The CRS string to match. |
const char * TSLWMSServiceLayer::title | ( | ) | const |
Returns the title associated with the layer via the service metadata.