public class TLspKML22LayerBuilder extends ALspLayerBuilder
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:
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 the model 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.
Modifier and Type | Method and Description |
---|---|
ILspLayer |
build()
Creates a new layer, as specified in the class javadoc.
|
TLspKML22LayerBuilder |
layerStyle(TLspLayerStyle aLayerStyle)
Set a layer style to be used during the rendering of the layer.
|
TLspKML22LayerBuilder |
model(ILcdModel aModel)
Sets a model for the layer to be built.
|
static TLspKML22LayerBuilder |
newBuilder()
Creates a new
KL22 layer builder. |
TLspKML22LayerBuilder |
resourceProvider(TLcdKML22ResourceProvider aResourceProvider)
Sets explicit resource provider for decoded models.
|
getIcon, getLabel, getLayerStyle, getLayerType, getModel, icon, label, layerType
public TLspKML22LayerBuilder model(ILcdModel aModel)
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)
or TLcdKML22RenderableModel
.
Note that a TLcdKML22Kml
will get wrapped in a TLcdKML22RenderableModel
before
it is added to the created layer.
model
in class ALspLayerBuilder
aModel
- a KML modelILcdLayer.getModel()
public static TLspKML22LayerBuilder newBuilder()
KL22 layer
builder.public TLspKML22LayerBuilder resourceProvider(TLcdKML22ResourceProvider aResourceProvider)
aResourceProvider
- a resource providerpublic TLspKML22LayerBuilder layerStyle(TLspLayerStyle aLayerStyle)
ALspLayerBuilder
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 calling
ILspLayer.setLayerStyle(TLspLayerStyle)
.layerStyle
in class ALspLayerBuilder
aLayerStyle
- the layer style. Must not be null
. If you want to set the default layer style, set TLspLayerStyle.newBuilder().build()
ILspLayer.getLayerStyle()
,
ILspLayer.setLayerStyle(TLspLayerStyle)
public ILspLayer build()
build
in class ALspLayerBuilder