public final class TLspParameterizedIconStyle extends ALspStyle implements ILspWorldElevationStyle, ILspEffectsHintStyle
expressions
.
Construction of this style is done through its TLspParameterizedIconStyle.Builder
.
The following properties of this style are calculated by an expression:
For defaults, see TLspParameterizedIconStyle.Builder
.
Example:
ILcdExpression<Boolean> visibilityExpression = eq(idAttribute, constant(43)); ILcdIcon[] icons = {someIcon, otherIcon}; ILcdExpression<Integer> attributeExpression = attribute(Integer.class, dataProperty); ILcdExpression<ILcdIcon> iconExpression = map(attributeExpression, icons, defaultIcon); ILcdExpression<Float> opacityExpression = fraction(fuelBurnAttribute, 0, 13000); TLspParameterizedIconStyle style = TLspParameterizedIconStyle.newBuilder() .visibility(visibilityExpression) .icon(iconExpression) .opacity(opacityExpression) .build();In this example, the object is visible if its ID is 43. The icon is determined by a class attribute, and the opacity depends on its fuel burn attribute. Note: - For large static data sets it's recommended to use
TLspPlotLayerBuilder
with an TLspPlotStyle
.
- TLcdExpressionFactory.viewPositionAttribute()
must not be used when the elevation mode is set to
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
.TLcdExpressionFactory
Modifier and Type | Class and Description |
---|---|
static class |
TLspParameterizedIconStyle.Builder<B extends TLspParameterizedIconStyle.Builder<B>>
Builder used to create parameterized icon styles.
|
ILspWorldElevationStyle.ElevationMode
ILspEffectsHintStyle.EffectsHint
Modifier and Type | Method and Description |
---|---|
TLspParameterizedIconStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object aO) |
Collection<ILspEffectsHintStyle.EffectsHint> |
getEffectsHints()
Returns the effects hints specified for this style.
|
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Returns the elevation mode of this style.
|
ILcdExpression<? extends ILcdIcon> |
getIcon()
Returns the expression that determines what icon to use.
|
ILcdExpression<Integer> |
getMinimumPixelSize()
Returns the expression that determines the minimum icon size in pixels.
|
ILcdExpression<Color> |
getModulationColor()
Gets the expression that determines the color that is modulated with the icon.
|
ILcdExpression<Float> |
getOffsetX()
Gets the expression that determines icon view offset in X direction.
|
ILcdExpression<Float> |
getOffsetY()
Gets the expression that determines the icon view offset in Y direction.
|
ILcdExpression<Float> |
getOpacity()
Returns the expression that determines transparency added to the icon.
|
ILcdExpression<Float> |
getScale()
Returns the expression that determines factor by which the icon width and height are scaled.
|
TLspIconStyle.ScalingMode |
getScalingMode()
Returns the scaling mode of this style.
|
ILcdExpression<Boolean> |
getVisibility()
Returns the expression that determines whether the object should be displayed or not.
|
ILcdExpression<Float> |
getWorldSize()
Returns the expression that determines the icon size in meters.
|
int |
hashCode() |
boolean |
isTransparent()
Determines whether this style is transparent.
|
static TLspParameterizedIconStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
boolean |
usesOrientation()
Returns whether the icon respects its orientation
|
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
public static TLspParameterizedIconStyle.Builder<?> newBuilder()
for example code fragments
,
Builder for default values
public ILcdExpression<? extends ILcdIcon> getIcon()
public ILcdExpression<Float> getScale()
VIEW_SCALING
or WORLD_SCALING_CLAMPED
.getScalingMode()
public ILcdExpression<Color> getModulationColor()
public ILcdExpression<Float> getOpacity()
public boolean isTransparent()
ALspStyle
isTransparent
in class ALspStyle
public ILcdExpression<Float> getOffsetX()
public ILcdExpression<Float> getOffsetY()
public boolean usesOrientation()
public TLspIconStyle.ScalingMode getScalingMode()
public ILcdExpression<Float> getWorldSize()
ScalingMode.WORLD_SCALING
or
ScalingMode.WORLD_SCALING_CLAMPED
.
By default this is set to 50000m.public ILcdExpression<Integer> getMinimumPixelSize()
ScalingMode.WORLD_SCALING_CLAMPED
or ScalingMode.WORLD_SCALING
.
As soon as the largest dimension (i.e. width or height) of the icon is smaller than this
minimum pixel size, the icon will be scaled to satisfy this minimum size.
By default this value is set to 0, which indicates that no minimum size will be
enforced.public ILcdExpression<Boolean> getVisibility()
public TLspParameterizedIconStyle.Builder<?> asBuilder()
ALspStyle
public Collection<ILspEffectsHintStyle.EffectsHint> getEffectsHints()
ILspEffectsHintStyle
getEffectsHints
in interface ILspEffectsHintStyle
public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle
getElevationMode
in interface ILspWorldElevationStyle