@FunctionalInterface public interface LabelCompositionStrategy
Provides an abstract parent class and three concrete sub classes for various strategies on how to compose the text label which can be rendered close to a node or within an area in an OSM map.
The three strategies below support three rules for composing a label:
LabelCompositionStrategy.StaticLabelCompositionStrategy
- the label is given by a static text
specified in the MapCSS style fileLabelCompositionStrategy.TagLookupCompositionStrategy
- the label is given by the content of a
tag whose name specified in the MapCSS style fileLabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy
- the label is given by the value
of one of the configured "name tags". The list of relevant name tags can be configured
in the JOSM preferences
see the preference options mappaint.nameOrder
and mappaint.nameComplementOrder
.Modifier and Type | Interface and Description |
---|---|
static class |
LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy
Strategy where the label is given by the value of one of the configured "name tags".
|
static class |
LabelCompositionStrategy.StaticLabelCompositionStrategy
Strategy where the label is given by a static text specified in the MapCSS style file.
|
static class |
LabelCompositionStrategy.TagLookupCompositionStrategy
Strategy where the label is given by the content of a tag whose name specified in the MapCSS style file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
compose(IPrimitive primitive)
Replies the text value to be rendered as label for the primitive
primitive . |
java.lang.String compose(IPrimitive primitive)
primitive
.primitive
- the primitive