Reputation: 64
I need to Render the a tile layer only for a country which is a polygon. I tried to get the extent of the polygon and limit the rendering to that extent but its not what i need as the shape of the extent is always a rectangle. So my question actually is, how can I render a tile layer inside a polygon.
Upvotes: 0
Views: 241
Reputation: 1421
You can use ol-ext ol/filter/Crop to crop a layer inside a feature area. See example: https://viglino.github.io/ol-ext/examples/filter/map.filter.crop.html
Upvotes: 2