Book Image

Leaflet.js Essentials

Book Image

Leaflet.js Essentials

Overview of this book

Table of Contents (13 chapters)
Leaflet.js Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using markers for data visualization


You have learned about several different marker types that still look like your typical marker. In this section, you will learn how to add markers that create a pie and bar chart—not exactly your standard marker.

Using the Leaflet Data Visualization Framework plugin

The Leaflet Data Visualization Framework plugin allows you to create markers that are just shapes: a standard pin style marker with a shape cutout, a star marker, and a polygon marker. It also allows you to add pie chart and bar chart markers to your map.

Note

The Leaflet Data Visualization Framework plugin also has markers for radial bar charts, coxcomb charts, stacked and radial meter markers, as well as a data layer, choropleth layer, and a legend control. This is a plugin worth exploring. You can download it at http://humangeo.github.io/leaflet-dvf/.

Creating basic markers

Creating basic markers is straightforward. The code used in the following steps will walk you through making a marker, a...