ChangeMapLayerStyleRequest RPC
Allow user to change map layer style between preconfigured options on the map (styles available for a WMS-layer etc).
Use cases
- change map layer style
Description
Requests a map layer style to be changed on a map.
Parameters
(* means the parameter is required)
Name | Type | Description | Default value |
---|---|---|---|
\* layerId | Number | id for maplayer to be modified (Oskari.mapframework.service.MapLayerService) | |
\* style | String | wanted style name (need be a configured a map service also) |
Examples
Change map layer style to new_awesome_style
.
const sb = Oskari.getSandbox();
const layerId = 1;
const newStyleName = 'new_awesome_style';
sb.postRequestByName('ChangeMapLayerStyleRequest', [layerId, newStyleName]);