I have plot states map using D3 and I am able to plot Centroid of each state using path.Centroid() function but once I merge the states(polygons) to make it large region path.Centroid() does not work.
How to find Centroid of merged Ploygons ?
Reference: here is the link to merged states example
Note: I have list of lat/long for all states centroid.
To find the centroid on the 'Merging States' example:
Wrapping the centroid coordinates in an array before creating the circle.