public class TLspGeorefGridStyle extends Object
Style that can be used for georef 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
(GeorefLevel
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, the following styles are supported:
For labels, the following styles are supported: For overlay components (seeTLspGeorefGridOverlayLabelBuilder
),
the following styles are supported:
On top of that, the text formatting can be controlled.
A simple way to use this class is to create a default style, see Builder#defaultGeorefGridStyle()
. The samples contain a class that builds a style from the ground up. This
sample code can be adjusted according to needs. See samples.lightspeed.grid.GeorefGridStyleFactory
GeorefGridStyleFactory
.
The following pseudo-code fragment shows how to use this style and its builder.
TLspGeorefGridStyle style = TLspGeorefGridStyle.newBuilder()
.body()
.interval(MAX_ZOOMED_OUT, START_1_DEGREE).customizableStyles(primaryStyles)
.interval(START_1_DEGREE, START_1_MINUTE).customizableStyles(secondaryStyles)
.interval(START_1_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryStyles)
.label(SQUARES_1_DEGREE)
.interval(MAX_ZOOMED_OUT, START_1_DEGREE).customizableStyles(primaryLabelStyles)
.interval(START_1_DEGREE, START_1_MINUTE).customizableStyles(secondaryLabelStyles)
.interval(START_1_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryLabelStyles)
.body(SQUARES_1_MINUTE)
.interval(START_1_MINUTE, START_1_OVER_10_MINUTE).customizableStyles(primaryStyles)
.interval(START_1_OVER_10_MINUTE, START_1_OVER_100_MINUTE).customizableStyles(secondaryStyles)
.interval(START_1_OVER_100_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryStyles)
.label(SQUARES_1_MINUTE)
.interval(START_1_MINUTE, START_1_OVER_10_MINUTE).customizableStyles(primaryLabelStyles).format("X2Y2")
.interval(START_1_OVER_10_MINUTE, START_1_OVER_100_MINUTE).customizableStyles(secondaryLabelStyles).format("X2Y2")
.interval(START_1_OVER_100_MINUTE, MAX_ZOOMED_IN).customizableStyles(tertiaryLabelStyles).format("X2Y2")
.overlay()
.interval(LABELS_START_100K, LABELS_START_10K).customizableStyles(primaryLabelStyles).format("D d X2Y2")
.interval(LABELS_START_10K, LABELS_START_1K).customizableStyles(secondaryLabelStyles).format("D d X3Y3")
...
.submit();
Modifier and Type | Class and Description |
---|---|
static class |
TLspGeorefGridStyle.Axis
The axis for which style information can be specified.
|
static class |
TLspGeorefGridStyle.Builder<B extends TLspGeorefGridStyle.Builder<B>>
Builder for Georef styles.
|
static class |
TLspGeorefGridStyle.GeorefLevel
The Georef grid level.
|
static class |
TLspGeorefGridStyle.LabelPosition
Defines the position of the line labels with respect to the view.
|
static class |
TLspGeorefGridStyle.LinePosition
Defines where the line labels should be positioned with respect to the line.
|
static class |
TLspGeorefGridStyle.Orientation
Defines how the labels should be oriented.
|
Modifier and Type | Method and Description |
---|---|
TLspGeorefGridStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
static TLspGeorefGridStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
public static TLspGeorefGridStyle.Builder<?> newBuilder()
public TLspGeorefGridStyle.Builder<?> asBuilder()