block by jeremycflin 970506938dc2a9b6400465b1f93abcee

Small Maptiples - d3.carto

Full Screen

Using‘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

forked from renecnielsen‘s block: Small Maptiples - d3.carto