0

i want to use material design icons as icon on the leaflet map. First I try with the extraMarker like this :

var marker = {
                lat: 51.505,
                lng: -0.009,
                focus: true,
                message: 'hey',
                draggable: false,
                icon: {
                    type: 'extraMarker',
                    icon: 'fa-coffee',
                    markerColor: 'red',
                    iconColor: 'black',
                    prefix: 'fa',
                    shape: 'circle'
                },
             };

this extraMarker is added successfully on the map with the coffee icon. my problem is : how can i use the angular material icon (e.g : local_cafe icon instead of fa-coffee ? ). there is a way to render materials icon on the leaflet map ?

Thanks !

Edric
  • 24,639
  • 13
  • 81
  • 91
simplo
  • 91
  • 1
  • 1
  • 10

1 Answers1

0

See the Leaflet.Icon.Glyph plugin.

IvanSanchez
  • 18,272
  • 3
  • 30
  • 45