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
| Field | Required | Description |
|---|---|---|
ids | Yes | The 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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||