Description
Styleeditor doesn't display the selected style and also restrict user from editing the style due to missing style config. This happens when layer config is fetched to get the correct name and workspace of the styles, resulting in an object and spreading it inside an array results in an exception with missing availableStyle information
|
const stylesConfig = layerConfig?.styles?.style || []; |
|
const layerConfigAvailableStyles = uniqBy([ |
|
layerConfig.defaultStyle, |
|
...stylesConfig |
|
], 'name'); |
How to reproduce
Use to this map to observe the above behavior
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/53702
Expected Result
Styleeditor should reflect the correct style selected and allow editing when applicable permissions are in place
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)
| Browser Affected |
Version |
| Internet Explorer |
|
| Edge |
|
| Chrome |
|
| Firefox |
|
| Safari |
|
Other useful information
Description
Styleeditor doesn't display the selected style and also restrict user from editing the style due to missing style config. This happens when layer config is fetched to get the correct name and workspace of the styles, resulting in an object and spreading it inside an array results in an exception with missing availableStyle information
MapStore2/web/client/epics/styleeditor.js
Lines 284 to 288 in 2cefcab
How to reproduce
Use to this map to observe the above behavior
https://dev-mapstore.geosolutionsgroup.com/mapstore/#/viewer/53702
Expected Result
Styleeditor should reflect the correct style selected and allow editing when applicable permissions are in place
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users)Other useful information