O'Reilly logo

Leaflet.js Essentials by Paul Crickard III

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Creating Custom Markers

In Chapter 3, Creating Heatmaps and Choropleth Maps, you learned how to style your maps to create a heatmap and a choropleth map. Leaflet allows you to further customize the style of your map by modifying the default markers. In this chapter, you will learn how to style markers by creating custom marker icons. You will also learn about the available marker plugins for styles and effects.

Creating a custom marker

In Leaflet, a marker is made from two images: an image that represents the marker and a second image that serves as the shadow to create depth. When you download Leaflet, there is an images folder. This folder contains the default marker: the blue pin that you have seen in your maps and a small shadow image. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required