Class TLspGeorefGridStyle
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();
- Since:
- 2015.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The axis for which style information can be specified.static class
Builder for Georef styles.static enum
The Georef grid level.static enum
Defines the position of the line labels with respect to the view.static enum
Defines where the line labels should be positioned with respect to the line.static enum
Defines how the labels should be oriented. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.static TLspGeorefGridStyle.Builder
<?> Creates a new builder with the default values.
-
Method Details
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
-
asBuilder
Creates a new builder initialized with all the properties of this style.- Returns:
- the new builder.
-