leaflet-fullHash
leaflet-fullHash copied to clipboard
Using existing base layers list
To use fullHash I have to create list of layers that are used for url hash.
I already have suchlist, it is list of base layers used for Layers control. This base layer list is not usable because index of the list is text that is used in visual interface for layers naming, so it may contain spaces or other characters not suitable for url hash.
So, I have to create another list just to change index text to suitable for hash. That means if I change layers I have to update both lists.
However, each layer in base layer list has an ID which is suitable for url hash.
I would propose that fullHash should be able to use base layer list optionally. Instead of list index it would use ID of each layer in list.
Scenario could be: if fullHash receives list on initialization, it uses that list. If list is not provided it simply uses base layer list from the map and it's IDs as hash values.