mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
refactored rerendering speed
This commit is contained in:
parent
b6bf317649
commit
69d1d749cf
32 changed files with 144 additions and 2045 deletions
14
src/utils/map/clusterIcon.ts
Normal file
14
src/utils/map/clusterIcon.ts
Normal 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>
|
||||
`
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue