Closed nickiaconis closed 11 years ago
Utilize Leaflet's built-in eachLayer function when iterating through layers.
eachLayer
Additionally, test if a layer's on or off method exists before trying to invoke it.
on
off
Good catch! Odd that this function is documented for L.LayerGroup, but not on L.Map.
L.LayerGroup
L.Map
Utilize Leaflet's built-in
eachLayer
function when iterating through layers.Additionally, test if a layer's
on
oroff
method exists before trying to invoke it.