I am working with this example: http://bl.ocks.org/mbostock/4206573
In every county, instead of a color, I want to use an image (and possibly have it repeat using css).
I tried adding an svg image to the document, and setting the path's fill attribute to url(<image_selector>)
but to no effect. Essentially:
var image = svg.append("image")
.attr("xlink:href", "http://lorempixel.com/g/400/400/")
.attr("x", 0)
.attr("y", 0)
.attr("width", 400)
.attr("height", 400)
.attr("id", "fillImage");
And for a couple of path elements, I changed the fill attribute to url('#fillImage')
. All this does is color the region bounded by the path white.
Does anyone have any ideas?