Class TLspKML22LayerBuilder
A layer builder for KML models. This layer builder takes care of everything needed to create a layer capable of visualizing a decoded KML file.
More specifically, layers created by this layer builder will contain the following functionality built in:
- A body styler
- A label styler
- A region filter (for filtering features with a region element, based on the view-scale)
- A resource provider. (For retrieving resources in the KML file)
Model parameters
that are updated automatically. (Needed for some files that retrieve data based on region).
Also note that this layer builder behaves differently based on the type of model you supply it.
TLcdKML22Kml
: This is what you get from themodel decoder
. Supplying this layer builder with a TLcdKML22Kml will automatically wrap it into a TLcdKML22RenderableModel.TLcdKML22RenderableModel
: This model will not be wrapped. It will be set on the created layer as-is.
This class supports KML data sets containing Collada data.
Consult the com.luciad.format.object3d
package documentation for more information on which Collada features are supported.
- Since:
- 2013.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates a new layer, as specified in the class javadoc.layerStyle
(TLspLayerStyle aLayerStyle) Set a layer style to be used during the rendering of the layer.Sets a model for the layer to be built.static TLspKML22LayerBuilder
Creates a newKL22 layer
builder.resourceProvider
(TLcdKML22ResourceProvider aResourceProvider) Sets explicit resource provider for decoded models.Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayerBuilder
getIcon, getLabel, getLayerStyle, getLayerType, getModel, icon, label, layerType
-
Method Details
-
model
Sets a model for the layer to be built. May only be an instance of
TLcdKML22Kml
(which is what you get from the model decoder) orTLcdKML22RenderableModel
.Note that a
TLcdKML22Kml
will get wrapped in aTLcdKML22RenderableModel
before it is added to the created layer.- Overrides:
model
in classALspLayerBuilder
- Parameters:
aModel
- a KML model- Returns:
- this layer builder
- See Also:
-
newBuilder
Creates a newKL22 layer
builder.- Returns:
- a new layer builder instance
-
resourceProvider
Sets explicit resource provider for decoded models. By default, resource providers are extracted from the model descriptor of the model.- Parameters:
aResourceProvider
- a resource provider- Returns:
- this layer builder
-
layerStyle
Description copied from class:ALspLayerBuilder
Set a layer style to be used during the rendering of the layer.TLspLayerStyle
is used to style the layer as a whole. Layer style can for example modify the transparency of a layer. Also, layer style can be modified after building the layer by callingILspLayer.setLayerStyle(TLspLayerStyle)
.- Overrides:
layerStyle
in classALspLayerBuilder
- Parameters:
aLayerStyle
- the layer style. Must not benull
. If you want to set the default layer style, setTLspLayerStyle.newBuilder().build()
- Returns:
- this
- See Also:
-
build
Creates a new layer, as specified in the class javadoc.- Specified by:
build
in classALspLayerBuilder
- Returns:
- a new KML layer.
-