typed some utils

This commit is contained in:
muerwre 2019-02-21 12:05:10 +07:00
parent cf6866240b
commit 5c3f09ec2c
5 changed files with 34 additions and 22 deletions

14
src/utils/clusterIcon.ts Normal file
View file

@ -0,0 +1,14 @@
import { DivIcon, divIcon } from 'leaflet';
export const clusterIcon = (cluster): DivIcon => divIcon({
html: `
<div class="custom-marker-cluster">
<span>${cluster.getChildCount()}</span>
<svg width="24" height="24" viewBox="-2 -2 36 36">
<circle cx="10" cy="20" fill="white" r="4" />
<circle cx="22" cy="20" fill="white" r="4" />
<circle cx="16" cy="10" fill="white" r="4" />
</svg>
</div>
`
});