But I noticed that as soon as I click to change layers, the LayerSwitcher div resets everything back to default, removing all my dynamic changes that I've applied to the div (ie. my CSS changes, adding custom JS functionality and jQuery UI elements).
I can't seem to find a solution or a similar problem reported by someone else. Is this a bug? How do I stop it from redrawing on layer change?
In the meantime, I have a workaround by reapplying my changes on changelayer event but that doesn't solve the problem and limits my customization:
I am using jQuery (2.0.x) and OL ver 2.12. I have my LayerSwitcher displayed outside my map in a div.
But I noticed that as soon as I click to change layers, the LayerSwitcher div resets everything back to default, removing all my dynamic changes that I've applied to the div (ie. my CSS changes, adding custom JS functionality and jQuery UI elements).
I can't seem to find a solution or a similar problem reported by someone else. Is this a bug? How do I stop it from redrawing on layer change?
In the meantime, I have a workaround by reapplying my changes on changelayer event but that doesn't solve the problem and limits my customization: