I have klokantech docker container for openmaptiles. Now I want take the KML of the country border and grey all outside the country.
The interesting polygon is a difference of bounding box and the border polygon. This difference polygon you can hide. For making difference it's good to use the turfjs tool.
- a Code example: https://jsfiddle.net/kmandov/cr2rav7v
- how mask a polygon https://www.mapbox.com/mapbox-gl-js/example/geojson-polygon/