currently, i am doing Map Data Across the Globe
but I want it to do it little differently I want the map to look like the globe
So, i am using d3.geoOrthographic
now I can zoom or drag the map
but I can’t manage to rotate the map anyhow
can anyone give me any idea how to update the projection or rotation
btw I am using V4. I guess in v3 it would be much simpler
It seems like anytime I want to do some in D3 that I assume is either hard or impossible, Mike Bostock has a working example of it and the code is straightforward. Here is his working example of just what you want, and it should be really easy to adapt.
I am constantly in awe of D3’s API. It should be the gold standard for how we write libraries.
thanks for the link
i need to learn how google .i mean i search with every single word that came to my mind but didn’t come across this .
thought the example you share in version 3 but hope it will help me to achieve similar output in v4
and about D3 i don’t like to call it libraries rather call it a Swiss Army Knife and more i spend time with d3 my respect goes higher and higher for mike bostock
Phi is, in the context of spherical rotations, the angle between the positive Z-axis and the point, Q, that you’re rotating to from the original point, P. So, when you move the mouse “up”, it changes that angle, which rotates the globe “vertically”.
We’re used to thinking about 3D coordinates as (x, y, z). For polar coordinates, it’s (p, θ, φ).