public static final class Map.Builder extends Object implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
Map.Builder |
backgroundColor(android.graphics.Color color)
Configures the background color of the map.
|
Map |
build()
Builds the Map for the configured settings.
|
void |
close() |
Map.Builder |
displayScale(double displayScale)
Specifies the display scale to allow the renderer to scale the graphics on high DPI displays.
|
Map.Builder |
dpi(double dpi)
Sets the DPI value that will be used to interpret map scales.
|
protected void |
finalize() |
Map.Builder |
layerList(LayerList layerList)
Sets an initial layer list to use.
|
Map.Builder |
reference(CoordinateReference reference)
Sets the reference for this
Map . |
public void close()
close
in interface AutoCloseable
@NotNull public Map build() throws IllegalStateException
Map
.IllegalStateException
- when the map reference is not an allowed reference.reference
@NotNull public Map.Builder reference(@NotNull CoordinateReference reference) throws NullPointerException
Map
.
This parameter is optional. The default is the reference with id EPSG:4978.
Only projected and geocentric references are allowed.
reference
- the reference of this Map
, cannot be null
.NullPointerException
- when the reference is null
.@NotNull public Map.Builder dpi(double dpi)
See Map#setDpi
for more information.
dpi
- the dpi@NotNull public Map.Builder displayScale(double displayScale)
See Map#setDisplayScale
for more information.
displayScale
- the display scale. A value of 1.0 corresponds with a display scale of 100%.@NotNull public Map.Builder layerList(@NotNull LayerList layerList) throws NullPointerException
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.
layerList
- the initial layer list to use. Cannot be null
.NullPointerException
- when the layer list is null
.@NotNull public Map.Builder backgroundColor(@NotNull android.graphics.Color color)
This parameter is optional. Not specifying one will pick a default color. In 3D, the atmospheric effect has priority over the background color.
color
- the color that is used to render the map background.