block by emeeks 28fcb6803748a31718d9

Dynamic Markers - d3.carto

Full Screen

Dynamic markers with d3.carto.map.

See also: Changing markers with d3.carto

This example simply shows that if your code can handle different types of SVG elements used as markers, then it can adjust those markers even when you’ve changed them from their default shape. If you click on any marker, it will show the network distance from that marker to all other markers (or gray if inaccessible). Even if you change the markers to little mailboxes by clicking SVG Marker, clicking on a little mailbox will still show network distance, this time with little mailboxes.

Little mailbox icon is public domain, as all icons should be.

index.html

d3map.css

dijkstra.js

icon_2330.svg