Interface IconSymbolizer

An IconSymbolizer describes the style representation of POINT data if styled with a specific icon.

interface IconSymbolizer {
    allowOverlap?: boolean | GeoStylerBooleanFunction;
    anchor?: "center" | "left" | "top" | "bottom" | "right" | GeoStylerStringFunction | "top-left" | "top-right" | "bottom-left" | "bottom-right";
    avoidEdges?: boolean | GeoStylerBooleanFunction;
    color?: string | GeoStylerStringFunction;
    format?: "image/svg+xml" | GeoStylerStringFunction | "image/png" | "image/jpg" | "image/jpeg" | "image/gif";
    haloBlur?: number | GeoStylerNumberFunction;
    haloColor?: string | GeoStylerStringFunction;
    haloOpacity?: number | GeoStylerNumberFunction;
    haloWidth?: number | GeoStylerNumberFunction;
    haloWidthUnit?: DistanceUnit;
    image?: string | GeoStylerStringFunction | Sprite;
    keepUpright?: boolean | GeoStylerBooleanFunction;
    kind: "Icon";
    offset?: [number | GeoStylerNumberFunction, number | GeoStylerNumberFunction];
    offsetAnchor?: "map" | GeoStylerStringFunction | "viewport";
    opacity?: number | GeoStylerNumberFunction;
    optional?: boolean | GeoStylerBooleanFunction;
    padding?: number | GeoStylerNumberFunction;
    pitchAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport";
    rotate?: number | GeoStylerNumberFunction;
    rotationAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport";
    size?: number | GeoStylerNumberFunction;
    sizeUnit?: DistanceUnit;
    textFit?: "both" | "none" | "height" | "width" | GeoStylerStringFunction;
    textFitPadding?: [number | GeoStylerNumberFunction, number | GeoStylerNumberFunction, number | GeoStylerNumberFunction, number | GeoStylerNumberFunction];
    visibility?: boolean | GeoStylerBooleanFunction;
}

Hierarchy (view full)

Properties

allowOverlap?: boolean | GeoStylerBooleanFunction

If true, the icon will be visible even if it collides with other previously drawn symbols.

anchor?: "center" | "left" | "top" | "bottom" | "right" | GeoStylerStringFunction | "top-left" | "top-right" | "bottom-left" | "bottom-right"

Part of the icon placed closest to the anchor. This may conflict with a set offset.

avoidEdges?: boolean | GeoStylerBooleanFunction

This is a property relevant if using tiled datasets. If true, the symbols will not cross tile edges to avoid mutual collisions.

color?: string | GeoStylerStringFunction

A color defined as a hex-color string.

format?: "image/svg+xml" | GeoStylerStringFunction | "image/png" | "image/jpg" | "image/jpeg" | "image/gif"

An optional configuration for the image format as MIME type. This might be needed if the image(path) has no filending specified. e.g. http://myserver/getImage

haloBlur?: number | GeoStylerNumberFunction

The halo's fadeout distance towards the outside.

haloColor?: string | GeoStylerStringFunction

The color of the icons halo, which helps it stand out from backgrounds represented as a hex-color string.

haloOpacity?: number | GeoStylerNumberFunction

The opacity of the halo. A value between 0 and 1. 0 means no opacity (i.e. transparent) and 1 is fully opaque.

haloWidth?: number | GeoStylerNumberFunction

Distance of halo to the icons outline (pixels if haloWidthUnit is not defined).

haloWidthUnit?: DistanceUnit

Unit to use for the haloWidth.

image?: string | GeoStylerStringFunction | Sprite

A path/URL to the icon image file or a Sprite configuration.

keepUpright?: boolean | GeoStylerBooleanFunction

If true, the icon will be kept upright.

kind: "Icon"

Describes the type of the kind of the Symbolizer.

offset?: [number | GeoStylerNumberFunction, number | GeoStylerNumberFunction]

The offset of the Symbolizer as [x, y] coordinates. Positive values indicate right and down, while negative values indicate left and up.

offsetAnchor?: "map" | GeoStylerStringFunction | "viewport"
opacity?: number | GeoStylerNumberFunction

Determines the total opacity for the Symbolizer. A value between 0 and 1. 0 is none opaque and 1 is full opaque.

optional?: boolean | GeoStylerBooleanFunction

Property relevant for mapbox-styles. If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.

padding?: number | GeoStylerNumberFunction

Size of the additional area around the icon used for detecting symbol collisions.

pitchAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport"
rotate?: number | GeoStylerNumberFunction

The rotation of the Symbolizer in degrees. Value should be between 0 and 360.

rotationAlignment?: "map" | "auto" | GeoStylerStringFunction | "viewport"
size?: number | GeoStylerNumberFunction

The Symbolizer size (pixels if sizeUnit is not defined).

sizeUnit?: DistanceUnit

Unit to use for the size.

textFit?: "both" | "none" | "height" | "width" | GeoStylerStringFunction
visibility?: boolean | GeoStylerBooleanFunction

Defines whether the Symbolizer should be visibile or not.