Leaflet markers with vite build

Published March 26, 2024

leaflet, vite
Contents
1
2
3
4
5
6
7
8
import markerIconUrl from "leaflet/dist/images/marker-icon.png";
import markerIconRetinaUrl from "leaflet/dist/images/marker-icon-2x.png";
import markerShadowUrl from "leaflet/dist/images/marker-shadow.png";

L.Icon.Default.prototype.options.iconUrl = markerIconUrl;
L.Icon.Default.prototype.options.iconRetinaUrl = markerIconRetinaUrl;
L.Icon.Default.prototype.options.shadowUrl = markerShadowUrl;
L.Icon.Default.imagePath = "";

Previously

Deploying static vite site on fly silly silly

2024-03-26

Next

Using pushState and replaceState better linking

2024-03-29

labnotes

Previously

Deploying static vite site on fly silly silly

2024-03-26

Next

Using pushState and replaceState better linking

2024-03-29