Skip to main content
100%

leaflet and d3.legend

✓ Published0🌍 Public
EEE2dev
Last edited Jun 24, 2018
Created on Jun 19, 2018

This example combines Leaflet and d3.legend to place three distinct legends on an interactive map, each corresponding to a separate dataset rendered as SVG circles. It shows how to map numerical, quantized, and categorical values to circle sizes and colors, with data embedded in HTML aside elements. The code uses Leaflet for map tiles and layers, D3 v5 for data parsing and scale construction, and the d3-legend plugin to generate the legends. Three datasets are processed, each with its own scale type (threshold, quantize, and ordinal), and their circles are added to layer groups while legends are positioned in a separate container.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/EE2dev/'>EE2dev</a>'s block: <a href='http://bl.ocks.org/EE2dev/75be7efe3faacedbeddfc384a0c4dabc'>leaflet and d3.legend</a>

mit Licensed

Similar vizzes