Noticeably Playful Monkeys

    leaflet-fontawesome-markers

    0.0.5 • Public • Published

    leaflet-fontawesome-markers NPM version

    Very simple vector markers with FontAwesome icons, compatible with Leaflet v1.

    Screenshot

    Use:

    var blueMarker = L.marker([lat, lon], {
        icon: L.icon.fontAwesome({ 
            iconClasses: 'fa fa-info-circle', // you _could_ add other icon classes, not tested.
            markerColor: '#00a9ce',
            iconColor: '#FFF'
        })
    }).addTo(map);
     
    var spinningMarker = L.marker([lat, lon], {
        icon: L.icon.fontAwesome({
            iconClasses: 'fa fa-circle-o-notch fa-spin',
            markerColor: '#ff89b5',
            iconColor: '#FFF',
            // use XY offsets to nudge positioning of icons, negative accepted
            iconXOffset: -2, 
            iconYOffset: 0,
        })
    }).addTo(map);

    Install

    npm i leaflet-fontawesome-markers

    DownloadsWeekly Downloads

    27

    Version

    0.0.5

    License

    Apache-2.0

    Last publish

    Collaborators

    • danwild