mehdi kamani
mehdi kamani

Reputation: 64

Rendering TileLayer inside a polygon

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

Answers (1)

Viglino Jean-Marc
Viglino Jean-Marc

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

Related Questions