Issue with loading custom marker icon using leaflet


#1

Hi
i am using a custome leaflet marker icon and i cant load the image even of the png file is on the same folder as the js file. Can you pls help?

if(Meteor.isClient) {
Template.tracking.rendered = function () {

    activeIcon = L.icon({
        iconUrl:"marker1.png",
        
        iconAnchor: [16, 37]
    });

}


#2

I’m not sure what you mean, but I think images should be put into the “public” folder. More information on this can be found in this section of the Meteor docs.
Hope this helps.


#3

i got this fixed. It looks like i cant have my project anywhere else other than the .meteor folder.