Skip to content

Mapbox color map except for polygons [closed]

Hello i was wondering if anybody knew if there was a way to add some kinda color to the whole map (I’m using mapbox) expect for the places where there are polygons. So that it works like a multipolygon but in facts it’s not.

Answer

No, it’s not possible to use polygons as a mask. The workaround is to create a much bigger polygon, then cut out those polygons from it, then fill that. You could use turf.difference for that task.