We need to use d3-geomap in an environment where fetch is not available, and we already have the TopoJSON contents loaded on the page, so I've added the geoData key as an alternative to geofile.
You can pass the TopoJSON contents in directly to the geoData property. In doing so, the geofile property is ignored, and fetch becomes an optional dependency. No other functionality should be affected.
Hi again!
We need to use
d3-geomap
in an environment wherefetch
is not available, and we already have theTopoJSON
contents loaded on the page, so I've added thegeoData
key as an alternative togeofile
.You can pass the
TopoJSON
contents in directly to thegeoData
property. In doing so, thegeofile
property is ignored, andfetch
becomes an optional dependency. No other functionality should be affected.I also added some inline docs for clarity :)