yaph / d3-geomap

A library for creating geographical maps based on D3.js
https://d3-geomap.github.io/
MIT License
132 stars 45 forks source link

feat: add optional geoData property as alternative to geofile #53

Closed dpraul closed 5 years ago

dpraul commented 5 years ago

Hi again!

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.

I also added some inline docs for clarity :)

yaph commented 5 years ago

Thanks for adding this useful feature.

dpraul commented 5 years ago

thanks for merging this so quickly! do you intend to do a release anytime soon?

yaph commented 5 years ago

Yes, not sure yet if this week or beginning of next week.

yaph commented 5 years ago

New release is out.

dpraul commented 5 years ago

Thank you!