LuciadCPillar 2023.1.04
luciad::LonLatGrid::Builder Class Referencefinal

Builder for a LonLat grid. More...

#include <luciad/layers/grids/lonlat/LonLatGrid.h>

Public Member Functions

 Builder (const Builder &other)
 
 ~Builder ()
 
LonLatGrid build () const
 Returns the LonLat grid. More...
 
BuilderlabelEdgeOffset (double labelEdgeOffset)
 This specifies the offset of the label, away from the edges of the view, in device independent pixels. More...
 
BuilderlabelGridOffset (double labelGridOffset)
 This specifies the offset of the label, in device independent pixels, away from the grid line to which it is attached. More...
 
BuilderlabelOrientation (GridLabelOrientation labelOrientation)
 This specifies the label orientation with respect to the line. More...
 
BuilderlabelPosition (LonLatGridLabelPosition labelPosition)
 This specifies the label position with respect to the view. More...
 
BuilderlabelStyle (TextStyle labelStyle)
 Indicates the label style to use for the LonLat grid. More...
 
BuilderlineLabelPosition (GridLineLabelPosition lineLabelPosition)
 This specifies the label position (with respect to the line) to use for the line labels. More...
 
BuilderlineStyle (LineStyle lineStyle)
 Indicates the line style to use for the LonLat grid. More...
 
BuilderoriginLabelStyle (TextStyle labelStyle)
 Indicates the origin label style to use for the LonLat grid. More...
 
BuilderoriginLat (double originLat)
 Indicates the origin latitude. More...
 
BuilderoriginLineStyle (LineStyle lineStyle)
 Indicates the origin line style to use for the LonLat grid. More...
 
BuilderoriginLon (double originLon)
 Indicates the origin longitude. More...
 
BuilderscaleMultiplier (double scaleMultiplier)
 Indicates the scale multiplier to use for the LonLat grid scale ranges. More...
 

Detailed Description

Builder for a LonLat grid.

Creates a LonLat grid with predefined scale ranges and default (customizable) styling.

Since
2023.1

Constructor & Destructor Documentation

◆ Builder()

luciad::LonLatGrid::Builder::Builder ( const Builder other)

◆ ~Builder()

luciad::LonLatGrid::Builder::~Builder ( )

Member Function Documentation

◆ build()

LonLatGrid luciad::LonLatGrid::Builder::build ( ) const

Returns the LonLat grid.

See also
luciad::LonLatGrid for information on the constraints for a LonLat grid.
Returns
the LonLat grid.
Exceptions
luciad::LogicExceptionwhen the settings are invalid.

◆ labelEdgeOffset()

Builder & luciad::LonLatGrid::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.

Parameters
labelEdgeOffsetthe edge offset value. Must be >= 0.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.
See also
luciad::LonLatGridSetting::Builder::labelEdgeOffset

◆ labelGridOffset()

Builder & luciad::LonLatGrid::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.

Parameters
labelGridOffsetthe grid offset value. Must be >= 0.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.
See also
luciad::LonLatGridSetting::Builder::labelGridOffset

◆ labelOrientation()

Builder & luciad::LonLatGrid::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.

Parameters
labelOrientationthe label orientation.
Returns
this builder.
See also
luciad::LonLatGridSetting::Builder::labelOrientation

◆ labelPosition()

Builder & luciad::LonLatGrid::Builder::labelPosition ( LonLatGridLabelPosition  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 AllSides.

Parameters
labelPositionthe label position.
Returns
this builder.
See also
luciad::LonLatGridSetting::Builder::labelPosition

◆ labelStyle()

Builder & luciad::LonLatGrid::Builder::labelStyle ( TextStyle  labelStyle)

Indicates the label style to use for the LonLat grid.

Parameters
labelStylethe label style.
Returns
this builder.

◆ lineLabelPosition()

Builder & luciad::LonLatGrid::Builder::lineLabelPosition ( GridLineLabelPosition  lineLabelPosition)

This specifies the label position (with respect to the line) to use for the line labels.

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.

Parameters
lineLabelPositionthe line label position.
Returns
this builder.
See also
luciad::LonLatGridSetting::Builder::lineLabelPosition

◆ lineStyle()

Builder & luciad::LonLatGrid::Builder::lineStyle ( LineStyle  lineStyle)

Indicates the line style to use for the LonLat grid.

Parameters
lineStylethe line style.
Returns
this builder.

◆ originLabelStyle()

Builder & luciad::LonLatGrid::Builder::originLabelStyle ( TextStyle  labelStyle)

Indicates the origin label style to use for the LonLat grid.

Parameters
labelStylethe label style.
Returns
this builder.

◆ originLat()

Builder & luciad::LonLatGrid::Builder::originLat ( double  originLat)

Indicates the origin latitude.

This is optional. Defaults to 0.

Parameters
originLatthe origin latitude.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the origin latitude is smaller than -90 or larger than 90.

◆ originLineStyle()

Builder & luciad::LonLatGrid::Builder::originLineStyle ( LineStyle  lineStyle)

Indicates the origin line style to use for the LonLat grid.

Parameters
lineStylethe line style.
Returns
this builder.

◆ originLon()

Builder & luciad::LonLatGrid::Builder::originLon ( double  originLon)

Indicates the origin longitude.

This is optional. Defaults to 0.

Parameters
originLonthe origin longitude.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the origin longitude is smaller than -180 or larger than 180.

◆ scaleMultiplier()

Builder & luciad::LonLatGrid::Builder::scaleMultiplier ( double  scaleMultiplier)

Indicates the scale multiplier to use for the LonLat 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.

Parameters
scaleMultiplierthe scale multiplier.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen an invalid value is passed.