block by emeeks 433a9b04f82a1c78af4b

Modal Infoboxes - d3.carto.map

Full Screen

A demonstration of modal infoboxes from d3.carto.map.

Click on any line, square, or area to see a modal infobox. By setting cartoLayer.clickableFeatures(true) then any SVG points or features will create a modal dialogue with the attributes of that feature. If the feature has a “Name” or “Label” attribute, that will be used as the title for the infobox.

You can modify the contents of the modal and how it processes the data associated with a feature by using d3.carto.modal and its built-in formatter, which is explained in the custom infobox example.

index.html

d3map.css