World Map Rotation
✓ Published2🌍 Public
This example presents an orthographic world map that users can rotate by dragging with the mouse. The map renders country boundaries from TopoJSON data using D3’s `geoOrthographic` projection and `geoPath`, with a graticule overlay and interactive hover highlighting on countries. Rotation is implemented through React state updates triggered by D3 drag events, using the `versor` library to compute quaternion-based rotations for smooth, intuitive globe manipulation. The visualization demonstrates a React component integrating D3’s drag behavior, projection system, and geographic data loading via hooks.
AI-generated descriptionDrag rotate a D3 world map with React
MIT Licensed