Constructor options for FeatureLayer.

Hierarchy

Properties

editable?: boolean

Whether the new layer is editable, true by default for feature layers.

Predicate filter function for this layer.

hoverable?: boolean

Whether the new layer detects hovering (i.e. a cursor hovering over features), false by default for all layers.

Since

2021.0

id?: string

The layer's ID. this should be unique within the map. If this parameter is omitted, an ID will be generated automatically.

incrementalRendering?: boolean

Configures the layer so it will not render all features at once, but instead will render them in small batches. This is useful when the layer contains a lot of data (e.g. a layer with many small features, or a layer with few very large features). In such cases, rendering can cause slow script warnings in the browser. On the one hand, by setting this flag to true, such warnings are avoided. On the other hand, the time it takes to draw all features on screen will be longer. Note that the added value of setting this flag to true depends very much on the nature of the data and the application. It is most useful for layers which visualize data that does not change very often, and in applications which need to remain responsive under frequent panning and zooming. When this value is undefined, the default value depends on this layer's loadingStrategy.

isSnapTarget?: boolean

Whether the new layer should be a potential target for snapping. True by default for all layers.

label?: string

The layer's label. This should be human readable as it is typically used in layer controls. If this parameter is omitted the layer's label will correspond with the layer ID.

layerType?: LayerType

Configures the layer's LayerType. Value must be one of luciad.view.LayerType.BASE, luciad.view.LayerType.STATIC or luciad.view.LayerType.DYNAMIC. This determines the way the map will render the layer and can influence rendering performance. The default is STATIC.

loadingStrategy?: LoadingStrategy

The loading strategy to use. If not set, the defaults are the following:

  • If the model supports spatial querying, then a LoadSpatially data loading strategy is used.
  • Else, an LoadEverything data loading strategy is used.
maxScale?: number

The maximum scale at which this layer should render. If the map is being shown at a higher scale, the layer will not be rendered. This parameter can be omitted if no maximum scale is desired.

minScale?: number

The minimum scale at which this layer should render. If the map is being shown at a lower scale, this layer will not be rendered. This parameter can be omitted if no minimum scale is desired.

painter?: FeaturePainter

The feature painter to use. If omitted, a default FeaturePainter will be used. This painter will draw the shape of the model object with a simple blue style. Set this property to replace this with custom visualization behavior.

panoramaModel?: PanoramaModel

The model used to retrieve images for drawPanoramic calls.

See

GeoCanvas.drawPanorama

Since

2020.1

performanceHints?: {
    discretization?: PerformanceHint;
    maxPaintUpdateTimePerFrame?: number;
    tessellation?: PerformanceHint;
}

Settings which affect the layer's painting and/or data loading performance.

Type declaration

  • Optional discretization?: PerformanceHint

    Specifies the quality setting to be used for the discretization of shapes such as geodetic lines. Using PerformanceHint.PREFER_PERFORMANCE will produce fewer vertices but will therefore result in a less accurate approximation of the actual shape. The default settings is PerformanceHint.PREFER_QUALITY.

  • Optional maxPaintUpdateTimePerFrame?: number

    Specifies the time per frame (in milliseconds) that the layer is allowed to spend on processing new features to be drawn. Lower numbers will ensure that frame rate remains high, but can increase the time it takes for the map to be fully up to date. Higher numbers will increase the throughput of updates at the cost of hiccups in the frame rate. If this property is not set, a default value will be chosen based on the layer type. Values in the range of 20 to 200 milliseconds are considered sensible. Much higher values can lead to disturbing hiccups when interacting with the map.

  • Optional tessellation?: PerformanceHint

    Determines which algorithm is used to triangulate polygons. The default setting is PerformanceHint.PREFER_QUALITY, which chooses a fully robust triangulation algorithm. Using PerformanceHint.PREFER_PERFORMANCE selects a faster but less robust algorithm. The fast algorithm expects shapes which consist of a single outer ring and zero or more inner rings which form holes. The inner or outer rings may neither intersect one another, nor may they be self-intersecting. Note that this setting only affects filled area shapes.

Since

2022.0

selectable?: boolean

Whether the new layer is selectable, false by default for all layers.

shapeProvider?: ShapeProvider

ShapeProvider generates the shape which is associated with the feature from the model.

transformer?: ClusteringTransformer

The clustering model transformer for this layer.

visible?: boolean

Configure the layer visibility. This can be changed afterwards with RasterTileSetLayer#visible.