leaflet layer switcher errors
Found two errors on leaflet layer switcher control:
- Clustered Marker categories are available in layer switcher, but not activated by default
- The layer switcher control is displayed as closed even if the show_layerswitcher selection in BE is set to "2" (display opened)
#1 Updated by Volker Burggräf about 2 years ago
Thanks for already fixing the second point!
The first is not yet fixed, is it? Maybe the activation code is missing?
Or should/could it be made selectable, whether a layer is initially activated or not?
By default it should be activated, I think.
#3 Updated by Volker Burggräf about 2 years ago
I found the solution. The layers have to be added to the map after collecting the clustered markers. Therefore the getMarkers function needs some more code. See attached the file class.tx_odsosm_leaflet.php with that function in it.
#5 Updated by Volker Burggräf about 2 years ago
great, seems to run w/o problems (on a quick test with TYPO3 7.6.16)!
BTW, I recommend to set maxClusterRadius:50 instead of maxClusterRadius:80. No need to have such a great distance between the grouped markers. Or make that value configurable.