LuciadCPillar 2023.1.04
luciad::Map::Builder Class Referencefinal

Builder to create a Map. More...

#include <luciad/maps/Map.h>

Public Member Functions

 ~Builder ()
 
BuilderbackgroundColor (Color color)
 Configures the background color of the map. More...
 
std::shared_ptr< Mapbuild ()
 Builds the Map for the configured settings. More...
 
BuilderdisplayScale (double displayScale)
 Specifies the display scale to allow the renderer to scale the graphics on high DPI displays. More...
 
Builderdpi (double dpi)
 Sets the DPI value that will be used to interpret map scales. More...
 
BuilderlayerList (std::shared_ptr< LayerList > layerList)
 Sets an initial layer list to use. More...
 
Builderreference (std::shared_ptr< CoordinateReference > reference)
 Sets the reference for this Map. More...
 

Detailed Description

Builder to create a Map.

Constructor & Destructor Documentation

◆ ~Builder()

luciad::Map::Builder::~Builder ( )

Member Function Documentation

◆ backgroundColor()

Builder & luciad::Map::Builder::backgroundColor ( Color  color)

Configures the background color of the map.

This parameter is optional. Not specifying one will pick a default color. In 3D, the atmospheric effect has priority over the background color.

Parameters
colorthe color that is used to render the map background.
Returns
this
Since
2020.1

◆ build()

std::shared_ptr< Map > luciad::Map::Builder::build ( )

Builds the Map for the configured settings.

Returns
the built Map.
Exceptions
luciad::LogicExceptionwhen the map reference is not an allowed reference.
See also
reference

◆ displayScale()

Builder & luciad::Map::Builder::displayScale ( double  displayScale)

Specifies the display scale to allow the renderer to scale the graphics on high DPI displays.

See Map::setDisplayScale for more information.

Parameters
displayScalethe display scale. A value of 1.0 corresponds with a display scale of 100%.
Returns
this
Since
2022.0

◆ dpi()

Builder & luciad::Map::Builder::dpi ( double  dpi)

Sets the DPI value that will be used to interpret map scales.

See Map::setDpi for more information.

Parameters
dpithe dpi
Returns
this

◆ layerList()

Builder & luciad::Map::Builder::layerList ( std::shared_ptr< LayerList layerList)

Sets an initial layer list to use.

Note: LayerList instances can be shared with an other Map, provided that both Map instances use the same paint thread.

This parameter is optional. Not specifying one will create a new, empty, instance.

Parameters
layerListthe initial layer list to use. Cannot be nullptr.
Exceptions
NullArgumentExceptionwhen the layer list is nullptr.
Returns
this

◆ reference()

Builder & luciad::Map::Builder::reference ( std::shared_ptr< CoordinateReference reference)

Sets the reference for this Map.

This parameter is optional. The default is the reference with id EPSG:4978.

Only projected and geocentric references are allowed.

Parameters
referencethe reference of this Map, cannot be nullptr.
Exceptions
NullArgumentExceptionwhen the reference is nullptr.
Returns
this