I\'m using the SVG located at http://upload.wikimedia.org/wikipedia/commons/3/32/Blank_US_Map.svg in a project and interacting with it with d3.js. I\'d like to create a cli
From here
The solution is to use the .datum() method on the selection.
var element = d3.select("#element"); var centroid = path.centroid(element.datum());