RearrangeSelectedMapLayerRequest RPC
Allow user to change order of map layers in relation to other layers on the map.
Use cases
- re-arrange order of layers on the map
Description
Requests order of a map layer to be changed in relation to other layers on the map.
Parameters
(* means the parameter is required)
Name | Type | Description | Default value |
---|---|---|---|
\* layerId | Number | id for maplayer to be modified (Oskari.mapframework.service.MapLayerService) | |
\* position | Number | wanted new position |
Examples
Change map layer position to 0.
const sb = Oskari.getSandbox();
const layerId = 1;
const newPosition = 0;
sb.postRequestByName('RearrangeSelectedMapLayerRequest', [layerId, newPosition]);