![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A scale band within a TSLDirectImportDataLayer.
This scale band may contain TSLDirectImportDataSets, and is used to define the scales at which this data is displayed.
When the TSLDirectImportDataLayer is drawn by a TSLDrawingSurface it will select a scale band to draw. This is based on the minimum scale of each band, and the scale the data is being drawn at.
This class may be created by using TSLDirectImportDataLayer::addScaleBand and will always be owned by the direct import layer.
Public Types | |
enum | TilingMethod { TilingMethodRegularGrid , TilingMethodPolarOptimised } |
Tiling methods, used to decide the layout of the tiles. More... | |
Public Member Functions | |
void | tilingMethod (TSLDirectImportScaleBand::TilingMethod method) |
TSLDirectImportScaleBand::TilingMethod | tilingMethod () |
void | setPolarTilingFactors (double startThreshold, double interval) |
const char * | name () const |
double | minScale () const |
unsigned int | tilesX () const |
unsigned int | tilesY () const |
bool | automaticTiling () const |
Query whether the tiling was automatically setup or specified by the application. | |
const TSLDirectImportDataSet * | loadData (TSLDirectImportDataSet *dataSet, const TSLFeatureClassConfig *config=NULL) |
unsigned int | numDataSets () const |
const TSLDirectImportDataSet * | getDataSet (unsigned int index) const |
TSLDirectImportDataSet * | getDataSet (unsigned int index) |
bool | moveData (unsigned int from, unsigned int to) |
bool | moveDataSet (const TSLDirectImportDataSet *dataSetFrom, const TSLDirectImportDataSet *dataSetTo, bool placeBehind=true) |
bool | moveDataToBack (unsigned int from) |
bool | moveDataSetToBack (const TSLDirectImportDataSet *dataSetFrom) |
bool | moveDataToFront (unsigned int from) |
bool | moveDataSetToFront (const TSLDirectImportDataSet *dataSetFrom) |
bool | removeData (unsigned int index) |
bool | removeDataSet (const TSLDirectImportDataSet *dataSet) |
Tiling methods, used to decide the layout of the tiles.
bool TSLDirectImportScaleBand::automaticTiling | ( | ) | const |
Query whether the tiling was automatically setup or specified by the application.
TSLDirectImportDataSet * TSLDirectImportScaleBand::getDataSet | ( | unsigned int | index | ) |
Query a dataset
The application takes ownership of the returned pointer and must call TSLDirectImportDataSet::destroy when finished with it.
The application may modify the returned dataset. Any modified settings will not be applied until the application calls TSLDirectImportDataSet::reprocess or the data is otherwise reloaded by the layer.
index | The index of the dataset within this scale band. |
const TSLDirectImportDataSet * TSLDirectImportScaleBand::getDataSet | ( | unsigned int | index | ) | const |
Query a dataset
index | The index of the dataset within this scale band. |
const TSLDirectImportDataSet * TSLDirectImportScaleBand::loadData | ( | TSLDirectImportDataSet * | dataSet, |
const TSLFeatureClassConfig * | config = NULL ) |
Load some data for display.
The provided TSLFeatureClassConfig will be used to determine feature masking, classification, and rendering of the data.
The provided data will be scheduled to load asynchronously. The application must provide an implementation of TSLDirectImportDataLayerCallbacks in order to be notified when the load/processing has completed.
The data will be loaded into this scale band regardless of the data's scale. Data may be sorted into an appropriate band automatically by calling TSLDirectImportDatalayer::loadData.
TSLDirectImportDataSet::minDisplayScale and TSLDirectImportDataSet::maxDisplayScale may be used to further limit the display of the dataset within the band.
If a TSLDirectImportDataSetMultiLevelRaster is loaded then any child data sets will be used in order to provide efficient processing/display within the scale band. The min/max display scale of the base data set and each child will be set accordingly in order to achieve this.
Features will be rendered based on the definition in the provided TSLFeatureClassConfig.
dataSet | The data to load. This object may be created by calling TSLDirectImportDataLayer::createDataSets. The application retains ownership of this object. |
config | The feature configuration object to use. This must be provided for vector datasets. |
double TSLDirectImportScaleBand::minScale | ( | ) | const |
Query the minimum display scale of this band.
bool TSLDirectImportScaleBand::moveData | ( | unsigned int | from, |
unsigned int | to ) |
Move a dataset to the specified index
This method may be used to modify the draw order of data within the scale band. This operation will be performed synchronously.
from | The index of the dataset to move |
to | The index to move the dataset to. If a dataset exists at this index the moved dataset will be placed behind it. Passing numDataSets() will move the dataset to the front. |
bool TSLDirectImportScaleBand::moveDataSet | ( | const TSLDirectImportDataSet * | dataSetFrom, |
const TSLDirectImportDataSet * | dataSetTo, | ||
bool | placeBehind = true ) |
Move a dataset infront/behind another dataset
This method may be used to modify the draw order of data within the scale band. This operation will be performed synchronously.
dataSetFrom | The dataset to move |
dataSetTo | The dataset to move infront/behind of |
placeBehind | if true dataSetFront will be placed behind dataSetTo, otherwise it will be placed infront. |
bool TSLDirectImportScaleBand::moveDataSetToBack | ( | const TSLDirectImportDataSet * | dataSetFrom | ) |
Move a dataset to the back
dataSetFrom | The dataset to move |
bool TSLDirectImportScaleBand::moveDataSetToFront | ( | const TSLDirectImportDataSet * | dataSetFrom | ) |
Move a dataset to the front
dataSetFrom | The dataset to move |
bool TSLDirectImportScaleBand::moveDataToBack | ( | unsigned int | from | ) |
Move a dataset to the back
from | The index of the dataset to move |
bool TSLDirectImportScaleBand::moveDataToFront | ( | unsigned int | from | ) |
Move a dataset to the front
from | The index of the dataset to move |
const char * TSLDirectImportScaleBand::name | ( | ) | const |
Query the name of this band.
This name may be used to identify the band within the layer, and to set band-specific rendering via a TSLFeature.
unsigned int TSLDirectImportScaleBand::numDataSets | ( | ) | const |
Query the number of datasets within this scale band.
bool TSLDirectImportScaleBand::removeData | ( | unsigned int | index | ) |
Remove a dataset from the scale band
This operation will be performed synchronously.
If this method returns true the application should perform a redraw. This method will not trigger TSLDirectImportDataLayerCallbacks::requestRedraw.
index | The index of the dataset to remove |
bool TSLDirectImportScaleBand::removeDataSet | ( | const TSLDirectImportDataSet * | dataSet | ) |
Remove a dataset from the scale band
This operation will be performed synchronously.
If this method returns true the application should perform a redraw. This method will not trigger TSLDirectImportDataLayerCallbacks::requestRedraw.
dataset | The dataset to remove |
void TSLDirectImportScaleBand::setPolarTilingFactors | ( | double | startThreshold, |
double | interval ) |
Set the factors used for calculating tiles in the PolarOptimised method
The PolarOptimised tiling method will reduce the number of tiles at the poles, by increasing their width past a certain latitude threshold. This method uses intervals to decide the factor by which the number of tiles is reduced. This factor doubles with each interval past the threshold, meaning that with each interval, the number of tiles is progressively halved. By default, tiles will be optimised above and below a threshold of 70 degrees Latitude, with an interval of 10 degrees.
These values will always be interpreted as positive.
startThreshold | The starting latitude threshold. |
interval | The latitude value between intervals. |
unsigned int TSLDirectImportScaleBand::tilesX | ( | ) | const |
Query the number of horizontal tiles within the band
The value may be manually specified, or automatically calculated when the scale band is added.
unsigned int TSLDirectImportScaleBand::tilesY | ( | ) | const |
Query the number of vertical tiles within the band
The value may be manually specified, or automatically calculated when the scale band is added.
TSLDirectImportScaleBand::TilingMethod TSLDirectImportScaleBand::tilingMethod | ( | ) |
Get the tiling method.
void TSLDirectImportScaleBand::tilingMethod | ( | TSLDirectImportScaleBand::TilingMethod | method | ) |
Set the tiling method.
method | The method to use. |