public static class ControlScaleOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Modifier and Type | Method and Description |
---|---|
ControlScaleOptions |
build()
Builds the ControlScaleOptions new instance
|
ControlScaleOptions.Builder |
imperial(java.lang.Boolean imperial)
Whether to show the imperial scale line (mi/ft).
|
ControlScaleOptions.Builder |
maxWidth(java.lang.Number maxWidth)
Maximum width of the control in pixels.
|
ControlScaleOptions.Builder |
metric(java.lang.Boolean metric)
Whether to show the metric scale line (m/km).
|
ControlScaleOptions.Builder |
position(java.lang.String position)
The position of the control (one of the map corners
possible values: "topleft", "topright", "bottomleft", "bottomright" |
ControlScaleOptions.Builder |
updateWhenIdle(java.lang.Boolean updateWhenIdle)
If true, the control is updated on moveend, otherwise it's always up-to-date (updated on move).
|
public ControlScaleOptions.Builder position(java.lang.String position)
position
- the positionpublic ControlScaleOptions.Builder maxWidth(java.lang.Number maxWidth)
maxWidth
- the max widthpublic ControlScaleOptions.Builder metric(java.lang.Boolean metric)
metric
- the metricpublic ControlScaleOptions.Builder imperial(java.lang.Boolean imperial)
imperial
- the imperialpublic ControlScaleOptions.Builder updateWhenIdle(java.lang.Boolean updateWhenIdle)
updateWhenIdle
- the update when idlepublic ControlScaleOptions build()