用 mapbox gl 圆图层遮盖地图

Mask the map with a mapbox gl circle layer

有没有办法使用 Mapbox GL Circle Layer 来遮盖整个地图?我找不到任何示例或有用的链接。

I was able to add a mask layer using Mapbox GL GeoJSON layer

GL JS 中没有执行此操作的内置功能。

我建议在 GeoJSON 中创建圆形蒙版。 turf-circle 应该使这相对容易。