Skip to content

After add/remove osm-notes layer - map not scrolling, notes not shown. #2

@progserega

Description

@progserega
  1. I add osm-notes layer by code:
this.osmNotesLayer = new leafletOsmNotes();
this._map.addLayer(this.osmNotesLayer);

  1. Layer success added. Notes shoing on map. Scrolling map is work.
  2. I remove osm-notes layer by code:
this._map.removeLayer(this.osmNotesLayer);
delete this.osmNotesLayer;
  1. Layer with notes removed - notes removed from map, but scrolling of map is broken. I can not scroll map my mouse.
  2. If I again try add osm-notes layer - layer not added, notes not shown.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions