Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer with id 'co-fill' does not exist #475

Closed
allthesignals opened this issue Dec 28, 2017 · 5 comments
Closed

Layer with id 'co-fill' does not exist #475

allthesignals opened this issue Dec 28, 2017 · 5 comments

Comments

@allthesignals
Copy link
Collaborator

allthesignals commented Dec 28, 2017

TrackJS has reported this error over 50 times, see full stack trace here: https://my.trackjs.com/shared/NWFlNDdjZTVlZDg3NDE2YjhlNzU4YmM0ZjliNjc3Yzc

@chriswhong this is MapboxGL related - any ideas?

Steps to reproduce:

  1. Visit https://zola.planninglabs.nyc/ (default filters)
  2. Toggle OFF zoning districts
  3. Toggle OFF commercial overlays
  4. Double click zoning districts

App then enters degenerate state, you can see errors in console.

@allthesignals
Copy link
Collaborator Author

@chriswhong sometimes, also:

The layer 'zd-fill' does not exist in the map's style and cannot be queried for features.
Error: The layer 'zd_labels' does not exist in the map's style and cannot be removed
The layer 'zma-fill' does not exist in the map's style and cannot be queried for features.

The first step is to figure out how to reproduce this consistently... I think this is a major bug because it puts the app in a degenerate state. Some features stop working.

So far, I'm seeing this happen sometimes when I take these steps:

  • Toggle many layers quickly, zoning map amendments or zoning districts
  • Hover mouse over map while network requests are still occurring

It's really hard to reproduce.

@fruchala this is related to #461 - any thoughts on how to reproduce?

@allthesignals
Copy link
Collaborator Author

Update: this mostly seems to happen when very quickly toggling layers off and on. I can try to write a script to reproduce.

@allthesignals
Copy link
Collaborator Author

Alright, solid steps:

  1. Visit https://zola.planninglabs.nyc/ (default filters)
  2. Toggle OFF zoning districts
  3. Toggle OFF commercial overlays
  4. Double click zoning districts

App then enters degenerate state, you can see errors in console. The errors are repeated when hovering. @chriswhong any theories on this?

@allthesignals
Copy link
Collaborator Author

Full stack trace:

Error: Layer with id "co-fill" does not exist on this map.
    at Style.addLayer (http://localhost:4200/assets/vendor.js:111542:43)
    at Map.addLayer (http://localhost:4200/assets/vendor.js:121398:20)
    at Class.init (http://localhost:4200/assets/vendor.js:143071:16)
    at Class.superWrapper [as init] (http://localhost:4200/assets/vendor.js:68062:22)
    at new Class (http://localhost:4200/assets/vendor.js:63260:19)
    at Function._ClassMixinProps.create (http://localhost:4200/assets/vendor.js:63430:12)
    at FactoryManager.create (http://localhost:4200/assets/vendor.js:32833:25)
    at Proxy.create (http://localhost:4200/assets/vendor.js:32462:20)
    at CurlyComponentManager.create (http://localhost:4200/assets/vendor.js:42058:31)
    at http://localhost:4200/assets/vendor.js:24452:33"

@chriswhong
Copy link
Contributor

The layergroups all have a before property, which is the id of the mapbox GL layer they should render before... this was being calculated only once when the layergroup is added, but not again when it is toggled off and on again. 84b243a hotfixed this, ensuring the before property is calculated when visible is toggled. Closing.

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

No branches or pull requests

2 participants