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 found that the projection naturalEarth uses the code by d3-geo. But current view is only centered by [0, 0] .
And d3 has other center view like pacific by using .rotate([200, 0]), by offset
(This API named rotate is an Ambiguous name, and 200 means -160 means 160°E,wtf)
The features what I want is add an API named like offset in natural_earth.js to set longitude 160°E as center when changing projection.
map.setProjection({name: "naturalEarth",offset: [160,0],// pacific as center})
Motivation
I found that the projection
naturalEarth
uses the code byd3-geo
. But current view is only centered by [0, 0] .And d3 has other center view like
pacific
by using.rotate([200, 0])
, by offset(This API named
rotate
is an Ambiguous name, and200
means-160
means160°E
,wtf)The features what I want is add an API named like
offset
innatural_earth.js
to set longitude 160°E as center when changing projection.Design Alternatives
Design
https://observablehq.com/@d3/natural-earth
Mock-Up
Concepts
Implementation
d3-geo code:
https://github.com/d3/d3-geo/blob/0c27527d4f9f500698b28d33289ee1104ee22990/src/projection/index.js#L157-L165
The text was updated successfully, but these errors were encountered: