Docs
`/`

# API elements

No matching results

# Sections and content

No matching results

- `Enter` to go to the highlighted result.
- `↑` and `↓` to change highlight.
- `Tab` to switch between result lists.
- `Esc` to hide the results.

# Markers layer API

This reference describes the markers layer API.

The markers layer draws small shapes at the coordinates of the points you provide. You can define the size, color, shape and opacity of each individual marker:

You can create an example markers layer using the following code:

    const markers = DotAtlas.createLayer({
      points: [],
      type: "marker",
      markerSizeMultiplier: 10
    });

See the following documentation for all the point and layer properties you can use.

##
Point properties

###
markerColor

Determines the color of the marker. If the color is not provided for a point, the layer-wide `markerColor` is used.

###
markerShape

Determines the shape of the marker. The following shapes are supported: `circle`, `square` and `triangle`. If the property is not defined for a point, the layer-wide `markerShape` is used.

###
markerSize

Determines the size of the marker.

Marker size value must fall in the `0.0` ... `1.0` range. Values outside of this range will be clamped. If marker size is not provided, a size of `1.0` will be assumed.

See the `markerSizeMultiplier` property for the correspondence between the `markerSize` property and the actual on-screen representation of the marker.

###
markerOpacity

Determines the opacity of the marker. Values must fall in the `0.0` ... `1.0` range. If not provided, opacity of `1.0` is assumed.

##
Layer properties

###
markerColor

Determines the default color of markers on this layer, black by default.

###
markerShape

Determines the default shape of markers on this layer. The following shapes are supported: `circle`, `square` and `triangle`.

###
markerBorderWidth

Relative size of the outline drawn around markers on this layer.

Values must fall in the `0.0` ... `1.0` range, where `0.0` is no outline and `1.0` is the marker filled entirely with the outline color.

###
markerBorderOpacity

Opacity of the outline part of the marker, `1.0` by default.

###
markerFillOpacity

Opacity of the inner part of the marker, `0.35` by default.

###
markerSizeMultiplier

The scale to use to determine the on-screen size of markers.

When this layer is rendered, the on-screen size of markers will be computed in the following way:

- At zoom level 1.0, the on-screen size of markers will be computed as: `markerSize` * `markerSizeMultiplier`.

- At zoom levels between 1.0 and 16.0, an additional scale factor of `sqrt(zoomLevel)` will be applied to increase the on-screen marker size of the magnified visualization.

- At zoom level larger than 16.0, the on-screen marker size will be computed as: `4` * `markerSize` * `markerSizeMultiplier`.

Additionally, the on-screen size will not be smaller than `minAbsoluteMarkerSize`.

###
minAbsoluteMarkerSize

The minimum allowed on-screen size of markers on this layer, `1.0` by default.

See the documentation of `markerSizeMultiplier` for an overview of how the on-screen marker size is computed.

previous article
Elevations layer API
next article
Labels layer API