Builder to create a Map.
More...
◆ AutoAdjustDepthRangeEnabled()
Sets whether automatic adjustment of the camera near and far planes is enabled.
See Map.setAutoAdjustDepthRangeEnabled for more information.
This parameter is optional. The default is true.
- Parameters
-
| enabled | whether the near and far planes are adjusted automatically. |
- Returns
- this
- Since
- 2026.1
◆ BackgroundColor()
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
-
| color | the color that is used to render the map background. |
- Returns
- this
- Since
- 2020.1
◆ Build()
Builds the Map for the configured settings.
- Returns
- the built
Map.
- Exceptions
-
| System.InvalidOperationException | when the map reference is not an allowed reference. |
| System.ArgumentException | when the layer list, or a layer in it, is already attached to a map. |
- See also
Reference
◆ DisplayScale()
Specifies the display scale to allow the renderer to scale the graphics on high DPI displays.
See Map.DisplayScale for more information.
- Parameters
-
| displayScale | the 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()
Sets the DPI value that will be used to interpret map scales.
See Map.Dpi for more information.
- Parameters
-
- Returns
- this
◆ LayerList()
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
-
| layerList | the initial layer list to use. Cannot be null. |
- Returns
- this
- Exceptions
-
| System.ArgumentNullException | when the layer list is null. |
◆ MaxMemoryUsageHint()
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 2000 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 uneven, 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
-
| cpuMemory | a hint for the maximum CPU memory usage, defined in MB. |
| gpuMemory | a hint for the maximum GPU memory usage, defined in MB. |
- Returns
- this
- Since
- 2024.1
◆ 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
-
| reference | the reference of this Map, cannot be null. |
- Returns
- this
- Exceptions
-
| System.ArgumentNullException | when the reference is null. |