ITDP / atlas

The frontend code for the Atlas of Urban Transport
MIT License
0 stars 0 forks source link

Integrate the block density and performance indicators #6

Closed kauebraga closed 11 months ago

kauebraga commented 2 years ago

Both the indicators are on a different spatial unit than the others (block density is at the block level, performance is at the 1kmx1km grid level).

As they are very granular (block density specially), they are not well suited to leaflet (too slow). There few other options such as leafgl and mapdeck. However, I still regard leafgl very experimental and mapdeck may miss some key functionalities (the ability to toggle layers, for example).

I think the best way to do this with leaflet is using map tiles, and avoid the pain of rendering thousands of polygon layers. The problem with this approach is that map tiles don't work the same way as polygons. You need to add them with a different function (using leaflet mapbox gl with additional packages), and that may require some engineering on the code. We may also lose some functionalities (popup, clicking), but that's alright. Other problem is that all the rendering (mostly the colors, borders etc) is made at Mapbox Studio. So we need to make sure that it presents the same visual identity as the rest of the maps (that are rendered on the application itself).

kauebraga commented 1 year ago

I'll leave it open only because of the performance indicators.