I've been working with Leaflet and despite extensive research, I'm still struggling to get my marker to display on the map.
I've tried all the solutions available out there, including the Angular workaround recommended by Leaflet. Currently, I've managed to get the marker image with the correct path to render in the HTML, but it still doesn't actually show the image. It's frustrating because the console confirms that it finds the image with the right path, but then states it can't load the image, even though there seems to be nothing wrong with it.
Here is the code I'm using:
let markerIcon = L.icon({ iconUrl: 'src/assests/icons/marker.png'});
L.marker([48.208, 16.373], {
icon: markerIcon,
riseOnHover: true
}).addTo(map);
Below is what the browser's rendered HTML console shows with the correct path and everything:
<img src="src/assests/icons/marker.png" class="leaflet-marker-icon leaflet-zoom-animated leaflet-interactive" alt="" tabindex="0" style="transform: translate3d(659px, 207px, 0px); z-index: 207;">
All I want is for that marker to appear! Without markers, my entire project feels pointless.