public static final class FeatureCanvas.GeometryDrawCommand extends Object implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close() |
FeatureCanvas.GeometryDrawCommand |
draped(boolean draped)
Indicates whether or not the geometry should be draped on top of the terrain.
|
FeatureCanvas.GeometryDrawCommand |
fill(FillStyle fillStyle)
Specifies the fill styling for the geometry, cannot be
null . |
protected void |
finalize() |
FeatureCanvas.GeometryDrawCommand |
geometry(Geometry geometry)
Specifies the geometry to draw.
|
FeatureCanvas.GeometryDrawCommand |
occlusionMode(OcclusionMode occlusionMode)
Determines when this geometry should be painted in 3D in relation to other 3D data.
|
FeatureCanvas.GeometryDrawCommand |
queryable(boolean queryable)
Indicates whether or not the geometry should be considered when a
Map#queryFeatures is requested. |
FeatureCanvas.GeometryDrawCommand |
stroke(ComplexStrokeLineStyle lineStyle)
Specifies the line styling of the geometry.
|
FeatureCanvas.GeometryDrawCommand |
stroke(LineStyle lineStyle)
Specifies the line styling of the geometry.
|
void |
submit()
Submits this draw command.
|
FeatureCanvas.GeometryDrawCommand |
zOrder(int zOrder)
The Z-order of the geometry.
|
public void close()
close
in interface AutoCloseable
@NotNull public FeatureCanvas.GeometryDrawCommand geometry(@NotNull Geometry geometry) throws NullPointerException
This property is mandatory.
geometry
- the geometry to draw, cannot be null
.GeometryDrawCommand
.NullPointerException
- when the geometry is null
.@NotNull public FeatureCanvas.GeometryDrawCommand stroke(@NotNull LineStyle lineStyle)
This is the geometry's outline if it's a surface.
Only one stroke style can be set, if this function is called when a ComplexStrokeLineStyle stroke
has already been set, it will be overwritten.
lineStyle
- the stroke styling to apply.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand stroke(@NotNull ComplexStrokeLineStyle lineStyle)
This is the geometry's outline if it's a surface.
Only one stroke style can be set, if this function is called when a lineStyle stroke
has already been set, it will be overwritten.
lineStyle
- the complex stroke styling to apply.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand fill(@NotNull FillStyle fillStyle)
null
.
When the given geometry does not have a surface, this style is ignored.
fillStyle
- the fill styling to apply.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand draped(boolean draped)
Draping means that the geometry is painted directly on top of the terrain’s surface relief.
By default, a geometry is draped if it has all zero Z values. Otherwise it will not be draped. You can override the default behaviour by setting this flag true or false. If you explicitly drape a 3D geometry, its 2D "footprint" is painted on the terrain.
This setting is only relevant for 3D maps and is ignored for 2D maps.
draped
- true if the geometry should be draped over terrain.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand queryable(boolean queryable)
Map#queryFeatures
is requested.
The default is true.
queryable
- true if the geometry should be considered.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand zOrder(int zOrder)
DrawCommands are painted from lowest to highest Z-order, so DrawCommands with a higher Z-order are painted on top of DrawCommands with a lower Z-order. Note that the Z-order only affects the ordering of features within the same layer. A feature from a certain layer will always get painted above any other feature from a layer that comes lower in the map's layer order, regardless of what Z-order they may have. The default value is 0.
zOrder
- the Z-order of this geometry.GeometryDrawCommand
.@NotNull public FeatureCanvas.GeometryDrawCommand occlusionMode(@NotNull OcclusionMode occlusionMode)
Details and limitations:
OcclusionMode#VisibleOnly
shows only the part of the geometry that is not obscured by other 3D data. This is the default.
OcclusionMode#AlwaysVisible
shows the entire geometry even if behind other 3D data. The geometry will appear in front of other objects.
OcclusionMode#OccludedOnly
shows only the part of the geometry that is behind other 3D data. You typically use this to display obscured geometries in combination with another style that uses OcclusionMode#VisibleOnly
mode.
The default is OcclusionMode#VisibleOnly
.
occlusionMode
- the occlusion mode to useGeometryDrawCommand
public void submit() throws IllegalStateException
Nothing will be painted if the draw command is not submitted.
IllegalStateException
- when there are missing geometry command calls or the command is already submitted.