seasketch / next

A modernization version of the SeaSketch platform, released in 2022.
https://seasketch.org
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Legend not showing #732

Closed wmcclin closed 2 months ago

wmcclin commented 2 months ago

In https://seasketch.org/california, the legend does not appear when layers are activated.

Screenshot 2024-04-15 at 8 29 04 AM
underbluewaters commented 2 months ago

I can't reproduce this. Can you show me exactly what layers are shown? Or try resetting layers.

wmcclin commented 2 months ago

Take a look at the image above. I believe the problem is with slow loading Esri map services coming from CDFW. If any of those services are turned on when the app loads, then the legend doesn't appear. Turn those all off, refresh, and the legend appears.

underbluewaters commented 2 months ago

There was a debounce function preventing the legend from being updated until all the layers had settled. Now it will wait a maximum of 1 second before redrawing the legend.