1. 55
    Replace the Marker with Custom HTML and Style with CSS
    1m 51s

Replace the Marker with Custom HTML and Style with CSS

Share this video with your friends

Send Tweet

Not only can we use the Leaflet Icon instance to add a custom image, we can create completely custom HTML! This opens the door to a lot of possibilities that you can't do with only an image like using CSS to add effects.

For this extra credit, use a different Leaflet icon type called DivIcon to transform our markers into custom HTML, which you can then style with CSS.

Click here for exercise instructions