You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm now trying to build a US map, and switched to the albersUsa projection. All of a sudden, my map code is giving me lots of errors, and it suggests that there is a missing method in the albersUsa projection?
this.projection=d3.geo.albers()// `albers` is ok, `albersUsa` is not!.scale(this.mapModel.get('mapScale')).translate(this.mapModel.get('translate'));// ...a while later:letbounds=[0,0];// just for this exampleconstcoords=this.projection(bounds);
In the albers projection, coords comes out as [2065.4195284613525, 73.63503703113963]. But if I switch to albersUsa, coords comes out as null.
Any advice would be much appreciated! Thanks
The text was updated successfully, but these errors were encountered:
As a fixed composite projection, d3.geoAlbersUsa does not support the following projection methods: projection.center, projection.rotate, projection.clipAngle, projection.clipExtent.
Apologies in advance if I've misunderstood something or logged this issue in the wrong place!
I've built numerous pan-and-zoom maps before, all of which used either the
mercator
oralbers
projections (I should also point out at this point that I'm using v3, not v4, of d3): https://github.com/d3/d3-3.x-api-reference/blob/master/Geo-Projections.mdI'm now trying to build a US map, and switched to the
albersUsa
projection. All of a sudden, my map code is giving me lots of errors, and it suggests that there is a missing method in the albersUsa projection?In the albers projection,
coords
comes out as[2065.4195284613525, 73.63503703113963]
. But if I switch toalbersUsa
,coords
comes out asnull
.Any advice would be much appreciated! Thanks
The text was updated successfully, but these errors were encountered: