Source code of (fork)
git clone git://
Log | Files | Refs | LICENSE

commit cdf076e3ef95c16fad4d9364bd9a4d5b625e9d89
parent a300aed2661358fb8894b1e8685b376214fa07ac
Author: Sergey Orlov <>
Date:   Wed, 17 Feb 2021 20:06:32 +0100

layers: update	hash state when layers added/removed on map

Use generic map add/remove events instead of ones generated by layers
control. Layers can be added and removed when editing custom layers and
these do not produce layer control events.

Fixes #664.

Msrc/lib/leaflet.hashState/Leaflet.Control.Layers.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/leaflet.hashState/Leaflet.Control.Layers.js b/src/lib/leaflet.hashState/Leaflet.Control.Layers.js @@ -4,7 +4,7 @@ import './leaflet.hashState'; L.Control.Layers.include(L.Mixin.HashState); L.Control.Layers.include({ - stateChangeEvents: ['baselayerchange', 'overlayadd', 'overlayremove'], + stateChangeEvents: ['layeradd', 'layerremove'], stateChangeEventsSource: '_map', serializeState: function() {