This is a polygon-fillPattern plugin extension for vue2-leaflet package
Important 2.0.0 change: The plugin needs to be imported with Vue.use
as indicated below, and the component name has been enforced to l-polygon-fill-pattern
.
npm install --save vue2-leaflet-polygonfillpattern
Check out the live demo
In main.js
:
import PolygonFillpattern from "vue2-leaflet-polygonfillpattern";
...
Vue.use(PolygonFillpattern);
In your component:
<l-polygon-fill-pattern
:lat-lngs="coordinates"
...
fillPattern="IMAGE"
imageScale="X"
/>
fillPattern
can be any image url or asset (e.g.:fillPattern="require(...)"
)imageScale
is a number that defines the image scale (e.g.:imageScale="0.6"
)
MIT polygon fillpattern plugin extension for vue2-leaflet package