leaflet-div-style-icon

DivIcons that can be passed svg-like style rules

Usage no npm install needed!

<script type="module">
  import leafletDivStyleIcon from 'https://cdn.skypack.dev/leaflet-div-style-icon';
</script>

README

Styleable Leaflet DivIcons

Divicons for rectangles and circles that can be passed svg-like style rules

Ideally it will be something like:

var icon = L.circleDivIcon({
  color: 'red'
});

where the object passed to the constructor is just like any style hash you give to the leaflet svg layers.