Open rguico opened 9 years ago
We need to manage which layers are on top of other ones better, instead of defaulting to "whichever one we checked last".
The best way to do this is probably a global variable, something like the following...
var ZINDEX = Object.freeze({ 'densityBase': 1, 'densityHighlighted': 2, 'bikeLanes': 3 }); // set the layer zIndex layer.setZIndex(ZINDEX.densityBase);
There's a Leaflet method to do this, I think. autoZIndex
I believe that when it's set to true, which is the default, then the layers maintain their zIndex.
true
We need to manage which layers are on top of other ones better, instead of defaulting to "whichever one we checked last".
The best way to do this is probably a global variable, something like the following...