public class TLspMBTilesVectorLayerBuilder extends ALspLayerBuilder
TLcdMBTilesModelDecoder
. For models containing image data,
use TLspRasterLayerBuilder
.
Vector tile layers automatically load tiles from a detail level which is appropriate for the current view. If so
desired, the qualityFactor(double)
method can be used to bias the tile selection toward a higher or lower
level of detail.
Vector tile layers generally provide the same styling options as
TLspShapeLayerBuilder
. See
TLcdMBTilesModelDecoder
for more information on the
modeling of vector tile features as they are presented to your styler. Also note that density styling is not
supported for vector tiles. Furthermore, the use of
complex strokes
is not recommended as it is
likely to produce disturbing discontinuities in the stroke pattern where lines touch a tile boundary.
Like other vector features, you can select MBTiles vector tile features using
TLspSelectController
. However, vector
tile features can be truncated at the boundaries of the tile that contain them. To enable selection styling for
objects that span across multiple tiles, see uidProvider(Function)
.
For more information on working with MBTiles vector data, refer to the tutorial
Working with MBTiles data.Modifier and Type | Method and Description |
---|---|
TLspMBTilesVectorLayerBuilder |
bodyMapScaleRange(TLcdDimensionInterval<TLcdMapScale> aBodyScaleRange)
Sets the body scale range for this layer in unitless map scale ratios.
|
TLspMBTilesVectorLayerBuilder |
bodyScaleRange(ILcdInterval aBodyScaleRange)
Sets the body scale range for this layer.
|
TLspMBTilesVectorLayerBuilder |
bodyStyler(TLspPaintState aPaintState,
ILspStyler aBodyStyler)
Sets the body styler for the given paint state.
|
TLspMBTilesVectorLayerBuilder |
bodyStyles(TLspPaintState aPaintState,
ALspStyle... aBodyStyles)
Sets the body styles for the given paint state.
|
TLspLayer |
build()
Creates a new layer instance.
|
TLspMBTilesVectorLayerBuilder |
icon(ILcdIcon aIcon)
Sets the icon of the layer.
|
TLspMBTilesVectorLayerBuilder |
label(String aLabel)
Sets the label of the layer.
|
TLspMBTilesVectorLayerBuilder |
labelMapScaleRange(TLcdDimensionInterval<TLcdMapScale> aLabelScaleRange)
Sets the label scale range for this layer in unitless map scale ratios.
|
TLspMBTilesVectorLayerBuilder |
labelScaleRange(ILcdInterval aLabelScaleRange)
Sets the label scale range for this layer.
|
TLspMBTilesVectorLayerBuilder |
labelStyler(TLspPaintState aPaintState,
ILspStyler aLabelStyler)
Sets the label styler for the given paint state.
|
TLspMBTilesVectorLayerBuilder |
labelStyles(TLspPaintState aPaintState,
ALspStyle... aLabelStyles)
Sets the label styles for the given paint state.
|
TLspMBTilesVectorLayerBuilder |
layerStyle(TLspLayerStyle aLayerStyle)
Set a layer style to be used during the rendering of the layer.
|
TLspMBTilesVectorLayerBuilder |
model(ILcdModel aModel)
Sets the model of the layer.
|
static TLspMBTilesVectorLayerBuilder |
newBuilder() |
TLspMBTilesVectorLayerBuilder |
qualityFactor(double aFactor)
Sets a quality factor that biases the level-of-detail selection of the vector tile layer.
|
TLspMBTilesVectorLayerBuilder |
selectable(boolean aSelectable) |
TLspMBTilesVectorLayerBuilder |
selectableSupported(boolean aSelectableSupported) |
TLspMBTilesVectorLayerBuilder |
sldStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle)
Assigns the supplied SLD style to both the bodies and the labels of the vector tile layer.
|
TLspMBTilesVectorLayerBuilder |
uidProvider(Function<Object,Object> aProvider)
Sets a unique ID provider that you can use to identify a conceptual map feature across tile boundaries and detail
levels.
|
getIcon, getLabel, getLayerStyle, getLayerType, getModel, layerType
public static TLspMBTilesVectorLayerBuilder newBuilder()
public TLspMBTilesVectorLayerBuilder qualityFactor(double aFactor)
Sets a quality factor that biases the level-of-detail selection of the vector tile layer. You can use this setting to trade off between visual quality and performance.
The default value is 1.0. Higher values increase the detail level, lower values decrease it.
aFactor
- the scale factor for the layer's level of detail. Values smaller than 1 will decrease the detail
level. Values larger than 1 increase the detail level.this
public TLspMBTilesVectorLayerBuilder model(ILcdModel aModel)
ALspLayerBuilder
null
.model
in class ALspLayerBuilder
aModel
- a modelILcdLayer.getModel()
public TLspMBTilesVectorLayerBuilder label(String aLabel)
ALspLayerBuilder
null
.label
in class ALspLayerBuilder
aLabel
- the labelILcdLayer.getLabel()
public TLspMBTilesVectorLayerBuilder icon(ILcdIcon aIcon)
ALspLayerBuilder
null
.icon
in class ALspLayerBuilder
aIcon
- the iconILcdLayer.getIcon()
public TLspMBTilesVectorLayerBuilder 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 TLspMBTilesVectorLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aBodyStyler)
this
TLspShapeLayerBuilder.bodyStyler(TLspPaintState, ILspStyler)
public TLspMBTilesVectorLayerBuilder bodyStyles(TLspPaintState aPaintState, ALspStyle... aBodyStyles)
this
TLspShapeLayerBuilder.bodyStyles(TLspPaintState, ALspStyle...)
public TLspMBTilesVectorLayerBuilder uidProvider(Function<Object,Object> aProvider)
equals()
to compare them. Typical implementations
retrieve a known data property from the feature using ILcdDataObject
.
If not set by the user, a default UID provider extracts the "feature ID" attribute from the MBTiles data. Not all
tools generate useful values for this attribute by default, though, so it might not work for all data.aProvider
- a function which returns a unique ID for a given feature.this
public TLspLayer build()
ALspLayerBuilder
Creates a new layer instance.
build
in class ALspLayerBuilder
public TLspMBTilesVectorLayerBuilder labelStyler(TLspPaintState aPaintState, ILspStyler aLabelStyler)
this
TLspShapeLayerBuilder.labelStyler(TLspPaintState, ILspStyler)
public TLspMBTilesVectorLayerBuilder selectable(boolean aSelectable)
public TLspMBTilesVectorLayerBuilder selectableSupported(boolean aSelectableSupported)
public TLspMBTilesVectorLayerBuilder labelStyles(TLspPaintState aPaintState, ALspStyle... aLabelStyles)
this
TLspShapeLayerBuilder.labelStyles(TLspPaintState, ALspStyle...)
public TLspMBTilesVectorLayerBuilder bodyScaleRange(ILcdInterval aBodyScaleRange)
this
TLspShapeLayerBuilder.bodyScaleRange(ILcdInterval)
public TLspMBTilesVectorLayerBuilder bodyMapScaleRange(TLcdDimensionInterval<TLcdMapScale> aBodyScaleRange)
this
TLspShapeLayerBuilder.bodyMapScaleRange(TLcdDimensionInterval)
public TLspMBTilesVectorLayerBuilder labelScaleRange(ILcdInterval aLabelScaleRange)
this
TLspShapeLayerBuilder.labelScaleRange(ILcdInterval)
public TLspMBTilesVectorLayerBuilder labelMapScaleRange(TLcdDimensionInterval<TLcdMapScale> aLabelScaleRange)
this
TLspShapeLayerBuilder.labelMapScaleRange(TLcdDimensionInterval)
public TLspMBTilesVectorLayerBuilder sldStyle(TLcdSLDFeatureTypeStyle aFeatureTypeStyle)
TLspSLDStyler
externally and assign it to the layer using bodyStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
or
labelStyler(com.luciad.view.lightspeed.layer.TLspPaintState, com.luciad.view.lightspeed.style.styler.ILspStyler)
.this