Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

How to safely deactivate the plugin/remove from map #14

@vvavepacket

Description

@vvavepacket

How do we safely remove the plugin in the map after we use it?

I tried removing it through: map.removeLayer(collisionLayer);, the labels are remove, but the rendering is messedup such that it affects other markers previously loaded on the map.

When I tried zooming, i encounter the following error after removing collisionLayer

Leaflet.LayerGroup.Collision.js:164 Uncaught TypeError: Cannot read property 'getZoom' of null
    at e._onZoomEnd (Leaflet.LayerGroup.Collision.js:164)
    at e.fire (Events.js:186)
    at e._moveEnd (Map.js:1184)
    at e.<anonymous> (Map.js:1628)

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