Using d3.carto.map's built-in canvas rendering and HTML5 canvas's built-in toDataUrl() function to create small multiples of the same map.
This example cycles through the various numeric attributes of the point dataset and restyles the map by changing layer.markerColor and layer.strokeColor. You have to call map.refresh() to update the display and then select the canvas element associated with the map to get access to the image data as a data URL, which you can pass to img elements.
This method of accessing toDataUrl only works with layers drawn using canvas.
forked from emeeks's block: Small Maptiples - d3.carto
Modified http://d3js.org/d3.v3.min.js to a secure url
Updated missing url https://rawgit.com/emeeks/d3-carto-map/master/d3.carto.map.js to https://cdn.jsdelivr.net/gh/emeeks/d3-carto-map/d3.carto.map.js
Modified http://d3js.org/topojson.v1.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://rawgit.com/emeeks/d3-carto-map/master/d3.carto.map.js
https://d3js.org/topojson.v1.min.js