Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Globe with panning & zooming

Public visualization

Viewing a saved revision (read-only)

f0c079b3de7c463ebf79387da0b7e8bf

Globe with panning & zooming

0 stars1🌍 Public
SShad Frigui
Last edited Sep 5, 2024
Created on Aug 23, 2024

This example presents an interactive globe that users can pan and zoom, rendered using a D3 orthographic projection. Landmasses and internal country borders are drawn from the visionscarto-world-atlas TopoJSON dataset via `d3.geoOrthographic` and `geoPath`. The globe responds to drag interactions for rotation and mouse-wheel zoom events, adjusting the projection’s rotation and scale through `d3.drag` and `d3.zoom` handlers. A fitted initial view establishes the default scale, while the sphere, land, and country-mesh features are styled via CSS classes.

AI-generated description

A globe with panning and zooming.

The country mesh represents only the internal borders between countries, excluding coastlines. This prevents an extra stroke, which could obscure detailed features like islands and inlets.

MIT Licensed