Set the drawing order of the layers

Sets the drawing order of all the layers of a project.

Required role: ORG_EDITOR, and the current user must have the MODIFY permission on the project.

Fields

FieldRequiredDescription
idsYesThe ids of all the layers of the project, each once, in the new order: first the layer drawn at the bottom, last the layer drawn on top.

The list must contain exactly the project's layers: a missing, unknown or repeated id returns 400, and so does a missing ids. Get the current list with GET .../layers-order. For a project without layers, send [].

Response

result is the list of the layer ids in the new order.

Layers order

The layers of a project are in a single, flat list: the drawing order of the layers on the map. The first layer is drawn at the bottom, under the others (for example a hydrography polygon layer), and the last one on top (for example cities as points).

It is separate from the layer tree (.../layers-groups), which only sets how layers are grouped and listed: moving a layer in the tree doesn't change its drawing order, and the other way around. A new layer is added at the end of the list, so it is drawn on top. Layers that reference a layer of another project have their own place in the list.

Organization

organization must be the organization of the access token, and the project 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 project

Body Params

The ids of all the layers of the project, in the new order

ids
array of strings
required

The ids of all the layers of the project, each once, in the new drawing order (first: drawn at the bottom, last: drawn on top)

ids*
Responses

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