LuciadCPillar C# 2024.1.06
Luciad.Maps.Map.Builder Class Reference

Builder to create a Map. More...

Inheritance diagram for Luciad.Maps.Map.Builder:

Public Member Functions

Luciad.Maps.Map.Builder BackgroundColor (System.Drawing.Color color)
 Configures the background color of the map. More...
 
Luciad.Maps.Map Build ()
 Builds the Map for the configured settings. More...
 
Luciad.Maps.Map.Builder DisplayScale (double displayScale)
 Specifies the display scale to allow the renderer to scale the graphics on high DPI displays. More...
 
void Dispose ()
 
Luciad.Maps.Map.Builder Dpi (double dpi)
 Sets the DPI value that will be used to interpret map scales. More...
 
Luciad.Maps.Map.Builder LayerList (Luciad.Layers.LayerList layerList)
 Sets an initial layer list to use. More...
 
Luciad.Maps.Map.Builder MaxMemoryUsageHint (double cpuMemory, double gpuMemory)
 A hint about the memory consumption allowed by the map. More...
 
Luciad.Maps.Map.Builder Reference (Luciad.Geodesy.CoordinateReference reference)
 Sets the reference for this Map. More...
 

Detailed Description

Builder to create a Map.

Member Function Documentation

◆ BackgroundColor()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.BackgroundColor ( System.Drawing.Color  color)
inline

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()

Luciad.Maps.Map Luciad.Maps.Map.Builder.Build ( )
inline

Builds the Map for the configured settings.

Returns
the built Map.
Exceptions
System.InvalidOperationExceptionwhen the map reference is not an allowed reference.
System.ArgumentExceptionwhen the layer list, or a layer in it, is already attached to a map.
See also
Reference

◆ DisplayScale()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.DisplayScale ( double  displayScale)
inline

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

See Map.DisplayScale for more information.

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

◆ Dispose()

void Luciad.Maps.Map.Builder.Dispose ( )
inline

◆ Dpi()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.Dpi ( double  dpi)
inline

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

See Map.Dpi for more information.

Parameters
dpithe dpi
Returns
this

◆ LayerList()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.LayerList ( Luciad.Layers.LayerList  layerList)
inline

Sets an initial layer list to use.

Note: LayerList instances and the layers in them can not be shared with another Map.

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

Parameters
layerListthe initial layer list to use. Cannot be null.
Returns
this
Exceptions
System.ArgumentNullExceptionwhen the layer list is null.

◆ MaxMemoryUsageHint()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.MaxMemoryUsageHint ( double  cpuMemory,
double  gpuMemory 
)
inline

A hint about the memory consumption allowed by the map.

These hints only apply to internal data managed by the map, not to any user data present in the application.

By default, the limits are 500 MB for CPU and 1000 MB for GPU.

This can help prevent the application from crashing. If you experience such behavior, try reducing both CPU and GPU memory from the default values. Alternatively, if memory is not a problem, pushing those values higher can improve caching efficiency.

Notes:

  • The values are expressed in megabytes.
  • The memory will be distributed over the layers in your map.
  • The distribution happens automatically and continuously.
  • The distribution can be un-even, so you can have large layers and small layers.
  • Each layer implementation will attempt to restrict its memory usage to its allocation portion.
  • Typically the layers will remove cached data to reach the limit.
  • When the memory limits are reached, some layers will reduce quality or amount of data loaded. If so, they will log this clearly.
Parameters
cpuMemorya hint for the maximum CPU memory usage, defined in MB.
gpuMemorya hint for the maximum GPU memory usage, defined in MB.
Returns
this
Since
2024.1

◆ Reference()

Luciad.Maps.Map.Builder Luciad.Maps.Map.Builder.Reference ( Luciad.Geodesy.CoordinateReference  reference)
inline

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 null.
Returns
this
Exceptions
System.ArgumentNullExceptionwhen the reference is null.