mapbox / mapbox-gl-js

Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
https://docs.mapbox.com/mapbox-gl-js/
Other
10.87k stars 2.19k forks source link

Cluster of Polygon feature #13172

Open tristan-garaud opened 1 month ago

tristan-garaud commented 1 month ago

Motivation

Design

In my idea maybe we could represent a polygon with a point (center). And we could set this point in a property.

Mock-Up

Something like this: 'properties': { 'anchor_polygon': [0, 0], ... }

And it will use the same logic as what we have now, but instead of displaying/clustering point it would be polygons.

I don't know if my idea is too simple and if I'm missing stuff.

Thanks