LuciadCPillar 2023.1.05
luciad::LonLatGridSetting::Builder Class Referencefinal

Builder for a LonLat grid setting. More...

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

Public Member Functions

 Builder (const Builder &other)
 
 ~Builder ()
 
LonLatGridSetting build () const
 Returns the LonLat grid setting. More...
 
BuilderdeltaLat (double deltaLat)
 Indicates the delta angle between latitude grid lines in degrees. More...
 
BuilderdeltaLon (double deltaLon)
 Indicates the delta angle between longitude grid lines in degrees. More...
 
BuilderlabelEdgeOffset (double labelEdgeOffset)
 This specifies the offset of the label, away from the edges of the view, in device independent pixels. More...
 
BuilderlabelFormat (const std::string &labelFormat)
 This specifies the format pattern to use for the labels of the current LonLat grid. 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 this setting. 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 this setting. More...
 
BuilderoriginLabelStyle (TextStyle labelStyle)
 Indicates the origin label style to use for this setting. More...
 
BuilderoriginLineStyle (LineStyle lineStyle)
 Indicates the origin line style to use for this setting. More...
 
BuilderscaleRange (MapScale minScale, MapScale maxScale)
 Indicates the scale range for which this setting applies. More...
 

Detailed Description

Builder for a LonLat grid setting.

Since
2023.1

Constructor & Destructor Documentation

◆ Builder()

luciad::LonLatGridSetting::Builder::Builder ( const Builder other)

◆ ~Builder()

luciad::LonLatGridSetting::Builder::~Builder ( )

Member Function Documentation

◆ build()

LonLatGridSetting luciad::LonLatGridSetting::Builder::build ( ) const

Returns the LonLat grid setting.

Mandatory parameters:

  • scaleRange
  • deltaLon
  • deltaLat

Other parameters are optional.

Returns
the LonLat grid setting.
Exceptions
luciad::LogicExceptionwhen not all mandatory parameters are set.

◆ deltaLat()

Builder & luciad::LonLatGridSetting::Builder::deltaLat ( double  deltaLat)

Indicates the delta angle between latitude grid lines in degrees.

This is mandatory.

Parameters
deltaLatthe delta angle.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the angle is smaller than or equal to 0.

◆ deltaLon()

Builder & luciad::LonLatGridSetting::Builder::deltaLon ( double  deltaLon)

Indicates the delta angle between longitude grid lines in degrees.

This is mandatory.

Parameters
deltaLonthe delta angle.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the angle is smaller than or equal to 0.

◆ labelEdgeOffset()

Builder & luciad::LonLatGridSetting::Builder::labelEdgeOffset ( double  labelEdgeOffset)

This specifies the offset of the label, away from the edges of the view, in device independent pixels.

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.

◆ labelFormat()

Builder & luciad::LonLatGridSetting::Builder::labelFormat ( const std::string &  labelFormat)

This specifies the format pattern to use for the labels of the current LonLat grid.

Parameters
labelFormatthe pattern to use.
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionif format is not a valid format pattern.
See also
luciad::LonLatFormat for valid pattern syntax.

◆ labelGridOffset()

Builder & luciad::LonLatGridSetting::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 optional. Defaults to 3.

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

◆ labelOrientation()

Builder & luciad::LonLatGridSetting::Builder::labelOrientation ( GridLabelOrientation  labelOrientation)

This specifies the label orientation with respect to the line.

This is optional. Defaults to AlongLine.

Parameters
labelOrientationthe label orientation.
Returns
this builder.

◆ labelPosition()

Builder & luciad::LonLatGridSetting::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 optional. Defaults to AllSides.

Parameters
labelPositionthe label position.
Returns
this builder.

◆ labelStyle()

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

Indicates the label style to use for this setting.

This is optional. Defaults to a white text style with font size 12 and a gray halo of size 1.

Parameters
labelStylethe label style.
Returns
this builder.

◆ lineLabelPosition()

Builder & luciad::LonLatGridSetting::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 optional. Defaults to AboveOrLeft.

Parameters
lineLabelPositionthe line label position.
Returns
this builder.

◆ lineStyle()

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

Indicates the line style to use for this setting.

This is optional. Defaults to a white line style with width 0.5 and 60% opacity.

Parameters
lineStylethe line style.
Returns
this builder.

◆ originLabelStyle()

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

Indicates the origin label style to use for this setting.

This is optional. Defaults to a white text style with font size 12, 80% opacity, and a red halo of size 1.

Parameters
labelStylethe label style.
Returns
this builder.

◆ originLineStyle()

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

Indicates the origin line style to use for this setting.

This is optional. Defaults to a red line style with width 1 and 60% opacity.

Parameters
lineStylethe line style.
Returns
this builder.

◆ scaleRange()

Builder & luciad::LonLatGridSetting::Builder::scaleRange ( MapScale  minScale,
MapScale  maxScale 
)

Indicates the scale range for which this setting applies.

This is mandatory.

Parameters
minScalethe min scale (most zoomed out).
maxScalethe max scale (most zoomed in).
Returns
this builder.
Exceptions
luciad::InvalidArgumentExceptionwhen the min scale is larger than or equal to the max scale.