Skip to content

Examples: Add globe example with OpenStreetMap raster tiles (no API key) #34465

Description

@clement-igonet

Description

webgl_loader_3dtiles is a great globe example, but it streams Google Photorealistic 3D Tiles through Cesium Ion with an API key locked to threejs.org, so users who copy it cannot run it as-is. There is currently no example showing the most common web-mapping case: standard XYZ raster tiles (OpenStreetMap and most self-hosted or commercial tile servers) projected on a globe, working out of the box without any account.

Solution

An example that projects OSM raster tiles on a globe with GlobeControls, fetched live (no committed assets beyond the screenshot), with OSM attribution and a tile host compliant with the OSM tile usage policy. Two possible shapes, whichever you prefer:

  1. Build on the pattern of webgl_loader_3dtiles, using 3d-tiles-renderer's XYZTilesPlugin with an OSM source. Smallest diff, consistent with the external-examples approach of More demos #26771, and could even be a variant of the existing example page.
  2. A self-contained educational example showing the mechanics (Web Mercator tile to ellipsoid projection, quadtree LOD, tile loading), the way webgl_geometry_terrain teaches terrain. More code, but it teaches what the plugin hides.

I would be happy to implement either and follow through with screenshot and e2e requirements.

Alternatives

Leaving it to third-party documentation: workable, but a keyless copy-paste globe example in the official gallery is the entry point most map developers look for first, and the existing globe example cannot serve that role because of the API key.

Additional context

I proposed related work in 2017 (#12586, OpenEarthView); today GlobeControls covers what my custom controls attempted, so this proposal builds on the existing stack instead. cc @gkjohnson since option 1 touches the 3d-tiles-renderer ecosystem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions