Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

TypeError upon removing VectorField layer from map using layer control #27

Open
zacharyburnett opened this issue Aug 17, 2018 · 2 comments

Comments

@zacharyburnett
Copy link

When unchecking a VectorFieldAnim layer from a layer control, the console shows the following error several hundred times:

Uncaught TypeError: Cannot read property 'latLngToContainerPoint' of null
    at e._drawParticle (L.CanvasLayer.VectorFieldAnim.js:122)
    at L.CanvasLayer.VectorFieldAnim.js:109
    at Array.forEach (<anonymous>)
    at n (L.CanvasLayer.VectorFieldAnim.js:108)
    at L.CanvasLayer.VectorFieldAnim.js:52
    at Mn (d3.v4.min.js:2)
    at Tn (d3.v4.min.js:2)

Is some asynchronous particle calculation not stopping after removing the map?

@zacharyburnett
Copy link
Author

I can reproduce this behavior with the following steps using a layer control:

  1. Add the VectorFieldAnim layer

  2. Add a ScalarField layer, in this case from an ASCII grid file

  3. Remove the VectorFieldAnim layer

The errors stop when the VectorFieldAnim layer is put back into the map

@rmarzocchi84
Copy link

Perhaps related #41 (I have the same behaviour)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants