On this page

Type Alias PointLayerOptions

PointLayerOptions: CommonShapeLayerOptions & {
    alignOnViewport?: boolean;
    cluster?: boolean;
    labelColor?: string;
    labelSize?: number;
    maxPointRadius?: number;
    minPointRadius?: number;
    pointColor?: string | ColorRamp;
    pointOpacity?: number | ZoomNumberValues;
    pointRadius?: number | ZoomNumberValues;
    property?: string;
    showLabel?: boolean;
    zoomCompensation?: boolean;
}

Type Declaration

  • OptionalalignOnViewport?: boolean

    If true, the points will keep their circular shape align with the wiewport. If false, the points will be like flatten on the map. This difference shows when the map is tilted. Default: true

  • Optionalcluster?: boolean

    Whether the points should cluster

  • OptionallabelColor?: string

    text color used for the number elements in each cluster. Applicable only when cluster is true. Default: #000000 (black)

  • OptionallabelSize?: number

    text size used for the number elements in each cluster. Applicable only when cluster is true. Default: 12

  • OptionalmaxPointRadius?: number

    The maximum point radius posible. Default: 40

  • OptionalminPointRadius?: number

    The minimum point radius posible. Default: 10

  • OptionalpointColor?: string | ColorRamp

    Can be a unique point color as a string (CSS color such as "#FF0000" or "red"). Alternatively, the color can be a ColorRamp with a range. In case of .cluster being true, the range of the ColorRamp will be addressed with the number of elements in the cluster. If .cluster is false, the color will be addressed using the value of the .property. If no .property is given but .pointColor is a ColorRamp, the chosen color is the one at the lower bound of the ColorRamp. Default: a color randomly pick from a list

  • OptionalpointOpacity?: number | ZoomNumberValues

    Opacity of the point or icon. This is can be a constant opacity in [0, 1] or a definition based on zoom levels. Alternatively, if not provided but the .pointColor is a ColorRamp, the opacity will be extracted from tha alpha component if present. Default: 1

  • OptionalpointRadius?: number | ZoomNumberValues

    Radius of the points. Can be a fixed size or a value dependant on the zoom. If .pointRadius is not provided, the radius will depend on the size of each cluster (if .cluster is true) or on the value of each point (if .property is provided and .pointColor is a ColorRamp). The radius will be between .minPointRadius and .maxPointRadius

  • Optionalproperty?: string

    The point property to observe and apply the radius and color upon. This is ignored if .cluster is true as the observed value will be fiorced to being the number of elements in each cluster.

    Default: none

  • OptionalshowLabel?: boolean

    Shows a label with the numerical value id true. If .cluster is true, the value will be the numebr of elements in the cluster.

    Default: true if cluster or dataDrivenStyleProperty are used, false otherwise.

  • OptionalzoomCompensation?: boolean

    Only if .cluster is false. If the radius is driven by a property, then it will also scale by zoomming if .zoomCompensation is true. If false, the radius will not adapt according to the zoom level. Default: true

Was this helpful?
SDK JS
Reference
PointLayerOptions