Add a pattern to a polygon
Use fill-pattern to draw a polygon from a repeating image pattern.
---
title: Add a pattern to a polygon
description: Use fill-pattern to draw a polygon from a repeating image pattern.
type: geojson
options:
zoom: 1
style:
extends: https://styles.trailsta.sh/osm-liberty.json
layers:
- type: fill
fill-pattern: https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Cat_silhouette.svg/64px-Cat_silhouette.svg.png
---
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-30,
-25
],
[
-30,
35
],
[
30,
35
],
[
30,
-25
],
[
-30,
-25
]
]
]
}
}