Open npltr62 opened 9 months ago
@npltr62 the logic for baselayers has changed in LMWC 3.7, so probably that script should be updated. This ticket has to be moved to https://github.com/3liz/lizmap-javascript-scripts/issues I guess.
Hi,
I had this problem too with background_selector script
To solved it I add the code below at line 29 of the JS file.
lizMap.mainLizmap.state.baseLayers.selectedBaseLayerName = nextbl_val;
I'm not really sur that the right thing to do, but it seems to works well.
You'll also need to rename your png file to display your background preview, for example : osm.png -> openStreetMap.png ignphoto.png -> Orthophoto IGN.png
Hope this help.
I had this problem too with background_selector script To solved it I add the code below at line 29 of the JS file.
lizMap.mainLizmap.state.baseLayers.selectedBaseLayerName = nextbl_val;
I'm not really sur that the right thing to do, but it seems to works well.
thanks this helped me a lot !
Thanks for debugging.
Can you make a PR on GitHub ? You can just click the "pen" on GitHub, it will create the PR and commit automatically.
What is the bug?
when i clicked on baselayer selector, the baselayers switcher change but baselayers doesn't seems to change.
Steps to reproduce the issue
i use this script
Versions, safeguards, check summary etc
lizmap-web-client : 3.7.3 qgis-server: 3.34
Check Lizmap plugin
Operating system
Windows 10
Browsers
Firefox
Browsers version
122.0.1
Relevant log output
No response