Add style

Description

Adds a style to a vector layer.

Endpoint

/path/{pathId}/vector/style

Method

POST

Access Level Rules

Access Level

edit+

Processing Units

Processing units

2

Parameters

NameDescriptionRequiredDefault

pathId

The id of the vector layer.

true

name

The name of the new style.

true

default

Boolean whether the style should be the default style.

true

method

The method of the style. Must be one of 'rules', 'transitionPoints', 'random', 'singleColor' or 'fromColorProperty'.

true

parameters

  • An object containing the parameters of the style.

  • Below table defines the style parameters

  • The content differs between methods.

true

Sample requests for different methods

{
    "name": "Vector Style",
    "default": true,
    "method": "singleColor",
    "parameters": {
        "alpha": 0.5,
        "width": 2,
        "radius": {
            "method": "constant",
            "parameters": {
                "value": 7
            }
        },
        "color": "#c75b1c"
πŸ–ŒοΈpageVector styling methods

Last updated