Update a style

Changes a style of your organization. Only the fields you send are changed; type can't be changed.

Required role: ORG_EDITOR.

  • name can't be emptied; description: "" removes the description.
  • Images (symbolData, linePatternData, patternData, borderPatternData): "" removes them, except symbolData.
  • A dash pattern and a pattern image are exclusive: sending one removes the other. [] removes a dash pattern.
  • styles (COMPOUND) replaces the list, with the same rules as on creation.

The layers that use the style are drawn with the new style; its samples are refreshed.

Style types

Styles belong to your organization and are used by the style rules of the layers (and as selection styles).

typeForSpecific fields (default)
POINTPointssymbolData (required: SVG, PNG, GIF or JPEG as Base64, 100 x 100 pixels at most), size (1, greater than 0), rotation (0, from 0 to less than 360), rotationLocked (false), proportional (false), proportionalScale (1), symbolOffset ({ "x": 0, "y": 0 })
LINELineslineColor (#000000), lineThickness (1), lineCap (BUTT, ROUND (default), SQUARE), lineJoin (BEVEL, ROUND, MITER (default)), lineMiterLimit (2), lineRoundLimit (1.05), dashPattern or linePatternData (an image, 128 x 128 pixels at most), arrowActive (false), arrowColor (#000000), arrowSize (1), arrowTransparency (0)
POLYGONPolygonsfillColor (#3D87CD), patternData (fill image, 128 x 128 pixels at most), patternBackgroundColor, showPatternBackgroundColor, borderColor (#000000), borderThickness (1), borderTransparency (0), borderDashPattern or borderPatternData
TEXTAnnotations and labelstextColor (#000000), outlineColor, bold, italic, typeface (AVERIA_SANS_LIBRE, BARLOW, IBM_PLEX_MONO, NOTO_SERIF, OPEN_SANS, ROBOTO, SHANTELL_SANS)
IMAGERaster, WMS and WMTS layersNone
COMPOUNDPoints or lines drawn with several stylesstyles: ids of POINT styles or of LINE styles (not mixed), in drawing order. A style can be in one compound style only.

All types have name (required, 2048 characters at most), description (2048 characters at most), transparency (from 0, opaque (default), to 100) and tags. Colors are hexadecimal (#RRGGBB or #RGB). Fields that don't apply to the type are ignored.

Organization

organization must be the organization of the access token, and the style must belong to it; otherwise the request returns 404.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Id of your organization (must match the access token)

uuid
required

Id of the style

Body Params

Fields to change. Fields not sent are left unchanged.

boolean

LINE: whether arrows show the line direction (default false)

string
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

LINE: hexadecimal color of the arrows (default #000000)

float

LINE: size of the arrows, 0 or more (default 1)

float

LINE: transparency of the arrows, from 0 to 100 (default 0)

boolean

TEXT: bold text

string
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

POLYGON: hexadecimal border color (default #000000)

borderDashPattern
array of floats
borderDashPattern
string

POLYGON: replaces the border image and removes the border dash pattern. "" removes it

int32
≥ 0

POLYGON: border thickness in pixels, 0 or more (default 1)

float
0 to 100

POLYGON: border transparency, from 0 to 100 (default 0)

dashPattern
array of floats
dashPattern
string
length between 0 and 2048

New description, 2048 characters at most. "" removes it

string
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

POLYGON: hexadecimal fill color (default #3D87CD)

boolean

TEXT: italic text

string
enum

LINE: BUTT, ROUND (default) or SQUARE

Allowed:
string
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

LINE: hexadecimal color (default #000000)

string
enum

LINE: BEVEL, ROUND or MITER (default)

Allowed:
float

LINE: miter limit, 0 or more (default 2)

string

LINE: replaces the image repeated along the line and removes the dash pattern. "" removes it

float

LINE: round limit, 0 or more (default 1.05)

int32
≥ 0

LINE: thickness in pixels, 0 or more (default 1)

string
length between 0 and 2048

New name, 2048 characters at most. Can't be emptied

string
^$|^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

TEXT: hexadecimal outline color; empty for no outline

string

POLYGON: hexadecimal color behind the fill pattern

string

POLYGON: replaces the fill image. "" removes it

boolean

POINT: whether the symbol size follows the map scale (default false)

int32
≥ 1

POINT: the scale at which a proportional symbol has its size (default 1)

float
0 to 359

POINT: rotation of the symbol in degrees, from 0 to less than 360 (default 0)

boolean

POINT: whether the symbol keeps its rotation when the map rotates (default false)

boolean

POLYGON: whether patternBackgroundColor is shown

float

POINT: size factor of the symbol, greater than 0 (default 1)

styles
array of strings

COMPOUND: replaces the list, with the same rules as on creation

styles
string

POINT: replaces the symbol (SVG, PNG, GIF or JPEG as Base64, 100 x 100 pixels at most)

symbolOffset
object

POINT: offset of the symbol, { "x": ..., "y": ... } (default 0, 0)

string
^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$

TEXT: hexadecimal text color (default #000000)

float
0 to 100

From 0 (opaque, default) to 100 (invisible)

string
enum

TEXT: AVERIA_SANS_LIBRE, BARLOW, IBM_PLEX_MONO, NOTO_SERIF, OPEN_SANS, ROBOTO or SHANTELL_SANS

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json