I'm having trouble trying to create a icon in Leaflet using Vuejs. It doesn't show the icon and I don't know how to fix the path. I have tried all the paths I can think of:
assets/leaf-green.png/assets/leaf-green.png../assets/leaf-green.png../../assets/leaf-green.pngsrc/assets/leaf-green.png../src/assets/leaf-green.png../../src/assets/leaf-green.png
Code (Map.vue):
const greenIcon = L.icon({
iconUrl: "assets/leaf-green.png",
iconSize: [38, 95],
iconAnchor: [22, 94],
popupAnchor: [-3, -76]
});
Project structure:
DevTools Network tab shows that it tries to load this url: http://localhost:8080/assets/leaf-green.png
Any ideas?
