LuciadCPillar 2023.1.04
|
Builder for a MGRS grid. More...
#include <luciad/layers/grids/mgrs/MgrsGrid.h>
Public Member Functions | |
Builder (const Builder &other) | |
~Builder () | |
MgrsGrid | build () const |
Returns the MGRS grid. More... | |
Builder & | labelEdgeOffset (double labelEdgeOffset) |
This specifies the offset of the label, away from the edges of the view, in device independent pixels. More... | |
Builder & | labelGridOffset (double labelGridOffset) |
This specifies the offset of the label, in device independent pixels, away from the grid line to which it is attached. More... | |
Builder & | labelOrientation (GridLabelOrientation labelOrientation) |
This specifies the label orientation with respect to the line. More... | |
Builder & | labelPosition (GridLabelPosition labelPosition) |
This specifies the label position with respect to the view. More... | |
Builder & | lineLabelPosition (GridLineLabelPosition lineLabelPosition) |
This specifies the label position (with respect to the line) to use for the line labels of the current MGRS type/level/interval combination. More... | |
Builder & | primaryLabelStyle (TextStyle labelStyle) |
Indicates the primary label style to use for the MGRS grid. More... | |
Builder & | primaryLineStyle (LineStyle lineStyle) |
Indicates the primary line style to use for the MGRS grid. More... | |
Builder & | scaleMultiplier (double scaleMultiplier) |
Indicates the scale multiplier to use for the MGRS grid scale ranges. More... | |
Builder & | secondaryLabelStyle (TextStyle labelStyle) |
Indicates the secondary label style to use for the MGRS grid. More... | |
Builder & | secondaryLineStyle (LineStyle lineStyle) |
Indicates the secondary line style to use for the MGRS grid. More... | |
Builder & | tertiaryLabelStyle (TextStyle labelStyle) |
Indicates the tertiary label style to use for the MGRS grid. More... | |
Builder & | tertiaryLineStyle (LineStyle lineStyle) |
Indicates the tertiary line style to use for the MGRS grid. More... | |
Builder for a MGRS grid.
Creates a MGRS grid with predefined scale ranges and default (customizable) styling.
The default styling is expressed in terms of 3 styles: primary, secondary and tertiary. At a given scale range, the most applicable MGRS grid level is styled with the primary style. Higher MGRS levels are styled with secondary and tertiary styles. For example, when zoomed in really far, 1m MGRS squares are styled with the primary style, 10m squares are styled with the secondary style and 100m squares are styled with the tertiary style.
luciad::MgrsGrid::Builder::Builder | ( | const Builder & | other | ) |
luciad::MgrsGrid::Builder::~Builder | ( | ) |
MgrsGrid luciad::MgrsGrid::Builder::build | ( | ) | const |
Returns the MGRS grid.
luciad::LogicException | when the settings are invalid. |
Builder & luciad::MgrsGrid::Builder::labelEdgeOffset | ( | double | labelEdgeOffset | ) |
This specifies the offset of the label, away from the edges of the view, in device independent pixels.
This is applied to all style settings in the grid.
This is optional. Defaults to 6
.
labelEdgeOffset | the edge offset value. Must be >= 0. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Builder & luciad::MgrsGrid::Builder::labelGridOffset | ( | double | labelGridOffset | ) |
This specifies the offset of the label, in device independent pixels, away from the grid line to which it is attached.
This is applied to all style settings in the grid.
This is optional. Defaults to 3
.
labelGridOffset | the grid offset value. Must be >= 0. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Builder & luciad::MgrsGrid::Builder::labelOrientation | ( | GridLabelOrientation | labelOrientation | ) |
This specifies the label orientation with respect to the line.
This is applied to all style settings in the grid.
This is optional. Defaults to AlongLine
.
labelOrientation | the label orientation. |
Builder & luciad::MgrsGrid::Builder::labelPosition | ( | GridLabelPosition | labelPosition | ) |
This specifies the label position with respect to the view.
They can for example be placed at the left or at the right edge of the view. For example, when a label is placed at the east or south side of a line, it is placed at the left or lower edge of the view when using a rectangular projection like Mercator.
This is applied to all style settings in the grid.
This is optional. Defaults to WestAndSouth
.
labelPosition | the label position. |
Builder & luciad::MgrsGrid::Builder::lineLabelPosition | ( | GridLineLabelPosition | lineLabelPosition | ) |
This specifies the label position (with respect to the line) to use for the line labels of the current MGRS type/level/interval combination.
They can for example be placed at the left or at the right of the line.
This is applied to all style settings in the grid.
This is optional. Defaults to AboveOrLeft
.
lineLabelPosition | the line label position. |
Indicates the primary label style to use for the MGRS grid.
labelStyle | the label style. |
Indicates the primary line style to use for the MGRS grid.
lineStyle | the line style. |
Builder & luciad::MgrsGrid::Builder::scaleMultiplier | ( | double | scaleMultiplier | ) |
Indicates the scale multiplier to use for the MGRS grid scale ranges.
The value must be within the range [0.1, 10.0]
.
A value larger than 1 makes the grid lines appear later when zooming in. This results in a coarser grid. A value below 1 makes the grid lines appear sooner when zooming in. This results in a finer grid.
scaleMultiplier | the scale multiplier. |
luciad::InvalidArgumentException | when an invalid value is passed. |
Indicates the secondary label style to use for the MGRS grid.
labelStyle | the label style. |
Indicates the secondary line style to use for the MGRS grid.
lineStyle | the line style. |
Indicates the tertiary label style to use for the MGRS grid.
labelStyle | the label style. |