12 · Globe
The whole world on a sphere, drawn from the same basemap tiles as the flat map. Drag to turn it: the place you grab stays under the pointer. Zoom in past 5.5 and it fades into the flat map, lined up with it. Labels stand upright on it and markers ride it.
Open it full screen · Edit and run it · Full source: 12-globe.ts
const map = new Map('map', {
center: [30, 10],
zoom: 2.5,
projection: 'globe',
style: styles.light({ url: 'https://tiles.openfreemap.org/planet' }),
})
// The halo round it, and the space behind.
map.setFog({ 'color': '#ffffff', 'space-color': '#dfe7f0' })