An object literal containing the ParameterizedLinePainter's parameters.

interface ParameterizedLinePainterConstructorOptions {
    defaultColor?: null | string;
    drapeTarget?: DrapeTarget;
    draped?: boolean;
    lineType?: LineType;
    lineWidth?: number;
    properties?: string[];
    propertyColorExpressions?: PropertyColorExpression[];
    rangeColorMap?: null | ColorMap;
    rangePropertyProvider?: ((feature, shape, pointIndex) => number);
    rangeWindow?: [number, number];
    selectionColor?: null | string;
}

Properties

defaultColor?: null | string

The default line color, represented as a CSS color string.

drapeTarget?: DrapeTarget

Whether these lines should be draped on top of the terrain or a 3D tiles mesh (or both).

Default

{@link DrapeTarget.NOT_DRAPED}

Since

2022.1

draped?: boolean

Whether these lines should be draped on top of the terrain or not.

This property only exists for backwards compatibility. You should use drapeTarget instead. false is equivalent to DrapeTarget.NOT_DRAPED and true is equivalent to DrapeTarget.TERRAIN.

Default

false

Deprecated

Use drapeTarget instead.

lineType?: LineType

Determines how lines between subsequent points will be interpreted.

lineWidth?: number

The line width, in pixels.

Default

1.
properties?: string[]

The list of property names that will be used in the ParameterizedLinePainter.propertyColorExpressions. If a property is ever to be used in the ParameterizedLinePainter.propertyColorExpressions, it must be listed in this array.

propertyColorExpressions?: PropertyColorExpression[]

An array of objects describing a mapping of property values to colors. See ParameterizedLinePainter.propertyColorExpressions.

rangeColorMap?: null | ColorMap

The ColorMap that maps a range value to a modulation color. null (the default) to disable.

rangePropertyProvider?: ((feature, shape, pointIndex) => number)

A function that returns a range value as a number for a given point on a line. The user of this class is free to choose the range of values. If no rangePropertyProvider is passed, range filtering is disabled (rangeWindow will be ignored). You can not modify the rangePropertyProvider after the ParameterizedLinePainter has been constructed.

Type declaration

    • (feature, shape, pointIndex): number
    • Parameters

      • feature: Feature<null | Shape, FeatureProperties>

        The feature for which to determine a value.

      • shape: Shape

        The shape for which to determine a value.

      • pointIndex: number

        The index of the point in the shape for which to determine a value.

      Returns number

rangeWindow?: [number, number]

The start / end value for range filtering as an array with two values.

selectionColor?: null | string

The color to paint selected lines with, represented as a CSS color string.