public final class TLcdMGRSGridStyle extends Object
Style that can be used for MGRS grid layers. This style can be used to style the grid lines as well as the labels.
This style makes it possible to define different styles for all
(MGRSType
, MGRSLevel
and body/label) combinations. For
every combination, it as also possible to define different scale intervals, in which
different styles are used. This can be used to make lines or labels more prominent
when zooming in.
For lines and labels, it is possible to customize the color, lineWidth, font, etc... . On top of that, the text formatting can be controlled.
The following pseudo-code fragment shows how to use this style and its builder.
TLcdMGRSGridStyle style = TLcdMGRSGridStyle.newBuilder()
.body()
.interval(MAX_ZOOMED_OUT, START_100K).lineColor(primaryLineColor)
.interval(START_100K, START_10K).lineColor(secondaryLineColor)
.interval(START_10K, MAX_ZOOMED_IN).lineColor(tertiaryLineColor)
.label(UTM)
.interval(MAX_ZOOMED_OUT, LABELS_START_100K).labelColor(primaryTextColor)
.interval(LABELS_START_100K, LABELS_START_10K).labelColor(secondaryTextColor)
.interval(LABELS_START_10K, MAX_ZOOMED_IN).labelColor(tertiaryTextColor)
.body(SQUARES_100000M)
.interval(START_100K, START_10K).lineColor(primaryLineColor)
.interval(START_10K, START_1K).lineColor(secondaryLineColor)
.interval(START_1K, MAX_ZOOMED_IN).lineColor(tertiaryLineColor)
.label(UPS, SQUARES_10000M)
.interval(LABELS_START_100K, LABELS_START_10K).labelColor(primaryTextColor).format("X5 Y5")
.interval(LABELS_START_10K, LABELS_START_1K).labelColor(secondaryTextColor).format("X5 Y5")
.interval(LABELS_START_1K, MAX_ZOOMED_IN).labelColor(tertiaryTextColor).format("X5 Y5")
.overlay()
.interval(LABELS_START_100K, LABELS_START_10K).labelColor(primaryTextColor).format("ZBS X4 Y4")
.interval(LABELS_START_10K, LABELS_START_1K).labelColor(secondaryTextColor).format("ZBS X3 Y3")
...
.submit();
Modifier and Type | Class and Description |
---|---|
static class |
TLcdMGRSGridStyle.Builder<B extends TLcdMGRSGridStyle.Builder<B>>
Builder for MGRS styles.
|
static class |
TLcdMGRSGridStyle.MGRSLevel
The MGRS level.
|
static class |
TLcdMGRSGridStyle.MGRSType
The MGRS Type.
|
Modifier and Type | Method and Description |
---|---|
TLcdMGRSGridStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
static TLcdMGRSGridStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
public static TLcdMGRSGridStyle.Builder<?> newBuilder()
public TLcdMGRSGridStyle.Builder<?> asBuilder()