Create a Spinning 3D Globe Map Without Writing Any Code
You have probably seen spinning globe animations on social media showing satellite imagery, land cover, or population data rotating smoothly in 3D. They look impressive, but you might assume they require custom code or specialized software. They do not. In this tutorial, I show you how to create a spinning 3D globe with raster and vector data overlays using a simple web-based tool. The entire process runs in your browser, and you can also reproduce it in a Jupyter Notebook environment.
Video tutorial: Create a Spinning 3D Globe Map Without Writing Any Code
What You Will Need¶
A web browser with internet access. That is it for the web-based approach.
For the Jupyter Notebook approach: no local installation is needed either, since the notebook runs in the browser via notebook.link.
Open the Web Demo¶
Go to ts.anymap.dev.
Click Live Examples on the homepage. You will see a gallery of examples organized by mapping library.
Under the MapLibre section, click the Control Grid example. This opens a globe view with two sample data layers already loaded: USGS imagery and ESA Global Land Cover.
You can toggle layers on and off using the layer control in the upper right corner. Try turning off the background basemap and keeping just the two data layers to see how they look on the globe by themselves.
Add Data Layers¶
The toolbar provides icons for adding different types of data. To add raster data, click the tile layer icon. You can add any XYZ or WMS tile layer by pasting its URL. The tool includes presets to get you started:
WMS layers: Select a WMS endpoint (for example, the Terrascope service from Belgium) and browse the available layers. Options include Sentinel-2 composites such as the false color composite at 10-meter resolution, as well as global land cover classifications.
XYZ tiles: Paste any standard XYZ tile URL to overlay custom raster data.
To add a layer, select it from the list and click Add Layer. You can stack multiple raster layers and reorder them in the layer panel.
Start the Spinning Globe¶
Click the toolbar icon (the two-bar icon) to open the globe controls.
Click the spinning globe icon. A dialog will appear with a speed slider.
Click Start to begin the rotation. The default speed works well for most cases, but you can adjust it while the globe is spinning. A speed of around 30 degrees per second provides a smooth, watchable rotation. Going higher (60 degrees per second) creates a faster effect, while lower values give a more gradual spin.
Before starting the spin, you can adjust the camera angle by dragging the globe and zooming in or out. Find the angle that best showcases your data, then click Start.
Add Vector Data¶
The tool also supports vector data. Click the point/line/polygon icon in the toolbar to open the vector data panel. From here you can:
Select a data source. The tool supports GeoParquet and other common vector formats. You can paste a URL pointing to your data file.
Once the data loads, choose a column for classification. For example, if you load a hexagonal H3 dataset of global building density, you can classify by building count.
Select a classification scheme. Quantile is a good default because it distributes features evenly across categories.
Choose a color palette. Options include Inferno, Viridis, and many others.
Optionally disable polygon outlines for a cleaner look.
Click Add Choropleth Map to render the data on the globe.
3D Extrusion¶
The vector data panel includes a 3D Extrusion checkbox. Enabling it before adding your choropleth map will render each polygon as a 3D column whose height corresponds to the data value. This creates a dramatic visualization where, for example, areas with high building density rise above the globe surface. You can rotate and zoom to explore the 3D features from different angles.
Note that 3D rendering on top of the MapLibre basemap can produce minor visual artifacts when rotating the globe. This is a known limitation of the 3D rendering engine, but it does not affect the data or the overall visualization.
Customize the Appearance¶
Several options let you refine how your globe looks:
Basemap: Click the basemap icon to switch between styles. For dark-themed visualizations (like building density with the Inferno palette), a dark or muted basemap works well. You can reorder layers so the basemap sits behind your data.
Legend: After adding a choropleth map, scroll down in the layer settings and click Add to Map next to the legend option. The legend appears in the lower left corner, showing the color scale and value ranges.
Layer order: Drag layers up or down in the layer panel to control which layers appear on top. Move your data layers above the basemap to make sure they are visible.
Use the Swipe Tool¶
The tool includes a swipe comparison feature for comparing two data layers side by side on the same globe:
Click the swipe tool button in the toolbar.
Select the layer for the left side (for example, Sentinel-2 false color composite).
Select the layer for the right side (for example, ESA land cover).
Click Activate.
A vertical divider appears on the globe. Drag it left or right to reveal each layer. This is useful for comparing satellite imagery against derived products like land cover maps. You can zoom into any location and continue using the swipe tool at any scale.
Use It in a Jupyter Notebook¶
If you prefer working in a notebook environment, the same functionality is available through the anymap Python package:
Go to ts.anymap.dev and scroll down to the MapLibre section.
Click the Control Grid example.
Click the notebook.link to open the notebook directly in your browser. No local installation is needed since it runs in a virtual environment within the browser.
The notebook code is minimal:
from anymap import maplibre
m = maplibre.Map()
m.add_control_grid()
mThis creates the same interactive map you saw in the web demo, complete with all the toolbar buttons for adding data layers, toggling the spinning globe, and using the swipe tool. The anymap package is lightweight with few dependencies.
Resources¶
Jupyter Notebook demo: notebook.link
GitHub repository: github
.com /opengeos /anymap -ts
Everything shown in this tutorial is freely available. You do not need to install anything on your computer - all you need is a web browser with internet access. If you run into any issues, feel free to submit them on the GitHub repository. Give it a try and share your spinning globe creations!