Leaflet.pattern
Leaflet.pattern copied to clipboard
individual patterns based on attribute for GeoJSON layer?
Hey there, as far as I know, it is only possible to set only one pattern of a layer containing various features, but I'm looking for a way to have one GeoJSON layer with various patterns based on an attribute? Is there any way to achieve this?
Thanks in advance!
var circle1 = new L.Circle({LatLng}, {radius}, { fillPattern: stripes, fillOpacity: 1.0});
circle1.addTo(layer);
var circle2 = new L.Circle({LatLng}, {radius}, { fillPattern: dots, fillOpacity: 1.0});
circle2.addTo(layer);
@Gjum I'm using a GeoJSON layer. You are just styling two different features.