natcap / global-web-viewer

A web viewer prototype for visualizing and analyzing global data.
GNU General Public License v3.0
3 stars 1 forks source link

County + basemap change = opaque #100

Open newtpatrol opened 2 years ago

newtpatrol commented 2 years ago

If I zoom to a country, it properly highlights the country's data and makes the surrounding area more opaque. But if I then switch to a different basemap, that country is no longer highlighted, it goes opaque too. To work around this, I can re-do the country search.

dcdenu4 commented 2 years ago

I thought for sure I had fixed this, but it appears that this is still a bug.

T.E. 1-3 hours

dcdenu4 commented 2 years ago

This is a little more complicated then I originally thought. When we switch basemaps, Mapbox removes all the current styling. What we've been doing is using our state variables of which services are selected and visible to style the map like it was with the new basemap. However, we're not tracking any state with regards to what is highlighted. So we'd have to start doing this in order to properly highlight selected regions on basemap change.

If there's time I'll come back to this issue, but I think it's fairly low priority as it is mostly an inconvenience.

newtpatrol commented 2 years ago

Well that's rather rude of Mapbox. Agreed that it's low priority.