Skip to content

JS errors after removing layer from a map #75

@aparshin

Description

@aparshin

Test case is the following:

var mvtSource = new L.TileLayer.MVTSource({...})
map.addLayer(mvtSource)
map.removeLayer(mvtSource)

This code results in a JS error in L.TileLayer.bringToFront() method.

Here is online demo: http://aparshin.ru/temp/mvt_bug.html

Looks like the reason is that you are trying to do some actions when previously requested vector tile is received for already removed 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