mapbox-gl-js
mapbox-gl-js copied to clipboard
Add a "square" or "rectangle" layer type
Motivation
We are using mapbox GL JS to display a rather large dataset of about 100,000 GeoJSON points. It is very performant when displayed with a circle layer. For design and UX reasons, we wanted to switch to a symbol layer using sprites for square icons, but it struggles heavily when displaying such a large dataset. We switched back to the circle layer for now.
My team was wondering if it would be possible to have something like a square or rectangle layer, so that each point is displayed as a square with about the same level of customizability and rendering performance as the circle layer.
Design
The design and usage would be relatively similar as the circle layer, but it would display each point of the dataset as squares instead. The advantages and drawbacks would be more or less the same as the circle layer, but would allow for more versatile maps with more varied ways to display dense data.
It could include extra paint properties specific to squares/rectangles such as border radius or rotation angle.