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
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
A JSON containing the parameters of the style. Below table defines the style parameters, whose content differs between methods.
true
Sample requests for different methods
The circle radius can be made dependent on the property of a vector using the method "onProperty" this dependency can be made linear or logarithmic.
Example:
If dashedLine is not null lines will become dashed lines. In this case dashedLine should be an array with two floats. The first float indicates the length of the open spaces the second the length of the dashes.
Example:
A pattern must be an object with:
type: One of solid, diagonal, horizontal or vertical
width: a float between 1 and 50
backgroundColor: a hex color, optional.
Example:
Alternatively the pattern can be an object of type drive. In this case you need to include a pathId of a png that is stored on the Drive.
Example:
In this case the png will be used as pattern.
An icon must be an object with
name: the name of the icon as a string.
All valid inputs for name can be listed with
Example:
Alternatively the icon can be an object of type drive. In this case you need to include a pathId of a png that is stored on the Drive.
Example:
In this case the png will be used as icon.
RECOMMENDED READING
Last updated