lennardv2 / Leaflet.awesome-markers

Colorful, iconic & retina-proof markers for Leaflet, based on the Font Awesome/Twitter Bootstrap icons.
MIT License
1.28k stars 340 forks source link

extraClasses doesn't work #92

Open eltonsantos opened 6 years ago

eltonsantos commented 6 years ago

I tried:

pointToLayer: function (feature, latlng) {
                    return L.marker(latlng, {
                        icon: L.AwesomeMarkers.icon({
                            icon: 'tint',
                            markerColor: 'blue',
                            prefix: 'fa',
                            extraClasses: 'someClass'
                        })
                    });
                }

But don't work, in source code, just show:

`<div class="awesome-marker-icon-blue awesome-marker leaflet-zoom-animated leaflet-interactive" tabindex="0" style="margin-left: -17px; margin-top: -42px; width: 35px; height: 45px; transform: translate3d(905px, 529px, 0px); z-index: 529;">
               <i class="fa fa-tint  icon-white"></i>
</div>`

Why it dont work?

astridx commented 6 years ago

I had the same problem. I then switched from the leaflet.awesome-markers.min.js file to the leaflet.awesome-markers.js file because I wanted to solve the problem. But in the file leaflet.awesome-markers.js everything worked fine. So I think that only the min-version has this bug. I hope that helps others too.