Skip to content

feat: add WebGL Earth 3D globe plugin#2226

Open
Fatemebookanian wants to merge 2 commits into
python-visualization:mainfrom
Fatemebookanian:feature/webgl-earth-plugin
Open

feat: add WebGL Earth 3D globe plugin#2226
Fatemebookanian wants to merge 2 commits into
python-visualization:mainfrom
Fatemebookanian:feature/webgl-earth-plugin

Conversation

@Fatemebookanian
Copy link
Copy Markdown

Summary

Adds a 3D globe visualization plugin using WebGL Earth v2. Closes #2162.

Classes added

  • WebGLEarth — main 3D globe, replaces the flat Leaflet map
  • WebGLEarthMarker — static markers on the globe
  • WebGLEarthTileLayer — additional tile layer overlays
  • WebGLEarthRealtime — live-updating data, 3D equivalent of the Realtime plugin

Usage

import folium
from folium.plugins import WebGLEarth, WebGLEarthMarker

m = folium.Map()
globe = WebGLEarth(center=[20, 0], zoom=2)
globe.add_to(m)
WebGLEarthMarker(location=[48.8, 2.3], popup="Paris").add_to(globe)
m.save("globe.html")

Checklist

  • New module folium/plugins/webgl_earth.py with docstrings
  • Imported in folium/plugins/__init__.py
  • 25 tests in tests/plugins/test_webgl_earth.py, all passing
  • Documentation in docs/user_guide/plugins/webgl_earth.md
  • Listed in docs/user_guide/plugins.rst

Notes

I used Claude (Anthropic) to help structure the code following
folium's existing plugin patterns. All code has been reviewed
and tested locally. Happy to make any changes based on feedback.

- WebGLEarth: 3D globe that replaces the flat Leaflet map
- WebGLEarthMarker: static markers on the globe
- WebGLEarthTileLayer: additional tile layer overlays
- WebGLEarthRealtime: live-updating data (e.g. ISS tracker)

Closes python-visualization#2162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support 3D tiles and layers

1 participant