Customize
Locations5 items
Focused Pin
5
Globe Color
Pin Color
Accent Color
Dot Spacing
0.9
Tilt
18
Idle Spin
4
Click to Add Pins
Figures3 items
Hint
Background
Text Color
Font
Text Scale
100%
Auto Play
Dotted Location Globe
Animations 87 views•72 uses
Props
16 propertieslocationsstring[]5 imagesfocusPinnumber5globeColorcolor#ff6f2epinColorcolor#ffffffaccentColorcolor#f2826adotSpacingnumber0.9tiltnumber18spinnumber4clickToPinbooleantruestatsstring[]3 imageshintstringDrag to rotatebackgroundcolor#141414textColorcolor#fffffffontFamilystringvar(--font-inter)…textScalenumber100autoPlaybooleanfalseGet this component
Copies the component into your project, installs what it needs, and pulls down its images. Nothing to download by hand.
npx spark-ui-registry@latest add dotted-location-globeWrites to components/spark-ui/ by default; override with --dir. The file is yours to edit; there is no package to keep in sync.
A dotted globe of the world's land that turns under the pointer, with pins anyone can add, by city name, by coordinates or by clicking the globe. The focused pin is ringed in the accent colour and tied by a leader line to a bracketed card with its details.
KEY FEATURES
- ·Land is sampled from a half-degree mask of Natural Earth's coastlines, and dots are spaced evenly by latitude so they don't bunch toward the poles
- ·Dots are shaded by a light from the upper right and drawn in a few brightness batches, so thousands of them stay cheap to redraw every frame
- ·Pins take a known city name or any latitude and longitude; clicking open land or sea drops a new pin there and focuses it
- ·Focusing a pin turns the globe to bring it just right of centre, and the card glides to follow it with a leader line and bracket
- ·Drag to spin with inertia; the dashed orbit below tracks the rotation, and the figures along the bottom count up on load