rveciana / d3-composite-projections

Set of d3 projections for showing countries distant lands together
http://rveciana.github.io/d3-composite-projections/
Other
99 stars 22 forks source link

d3.geoAlbersUsaTerritories() doesn't work with D3 v4 #18

Open fakebenjay opened 5 years ago

fakebenjay commented 5 years ago

Hey, I'm trying to use the geoAlbersUsaTerritories projection, but whenever I try, I get an error on line 222 (lower48 = d3Geo.geoAlbers()) saying Uncaught TypeError: d3Geo.geoAlbers is not a function

Likewise, if I try to use the standard d3.geoAlbersUsa() function, I get the exact same error, except at line 89 (which is identical to line 82,) and line 716 has a similar error if I try to use d3.geoConicConformalPortugal(). Whatever it is, something seems to be off with d3Geo.

I'm using D3 v4. Any ideas why this isn't behaving? Thanks!

rveciana commented 5 years ago

Hi, it seems to work:

https://beta.observablehq.com/@rveciana/d3-composite-projections-issue18

Are you importing only parts of the code?