- I add osm-notes layer by code:
this.osmNotesLayer = new leafletOsmNotes();
this._map.addLayer(this.osmNotesLayer);
- Layer success added. Notes shoing on map. Scrolling map is work.
- I remove osm-notes layer by code:
this._map.removeLayer(this.osmNotesLayer);
delete this.osmNotesLayer;
- Layer with notes removed - notes removed from map, but scrolling of map is broken. I can not scroll map my mouse.
- If I again try add osm-notes layer - layer not added, notes not shown.
- After reload web-page - osm-layer can show again, but also only once.
I sink, that code
map
.on('viewreset', this._load, this)
.on('moveend', this._load, this);
set event handlers on add layer, but not remove default handlers on remove layer.