Cesium viewer for testing local tileset.json trees, with a nix run launcher that serves the current directory with CORS.
From any directory containing a tileset.json:
nix run github:3dgi/tvTo force a rebuild of the viewer app:
nix run --refresh github:3dgi/tvThis is only necessary if this repo had an update.
Optional flags:
nix run github:3dgi/tv -- --port 8090 --tileset path/to/tileset.jsonFrom a directory containing tileset.json, build a preconfigured viewer:
nix run github:3dgi/tv -- buildFor a tileset elsewhere or with a different filename:
nix run github:3dgi/tv -- build --tileset /path/to/tileset-dir/tileset.jsonThe command writes index.html and tv-assets/ alongside the selected tileset
and exits without starting a server. Upload the entire tileset directory to a
static web server that serves index.html for directory URLs, then open that
directory's URL (for example, https://example.com/datasets/my-tileset/).
The viewer loads the selected tileset automatically using a relative URL, so no
hostname or query parameter needs to be configured. A tileset query parameter
can still override the configured tileset.
Run the command again to update the generated viewer. Existing pages or
tv-assets/ directories from another application are protected from overwriting.
The server needs no Bun or Nix installation.
Run from the local repository:
git clone git@github.com:3DGI/tv.git
cd ./tv
nix run .To force a rebuild of your local checkout:
nix run --refresh .Run from a directory containing tileset.json:
cd /path/to/tileset-dir
nix run --refresh ./tvServe a tileset from a different directory:
nix run --refresh ./tv -- --tileset /path/to/tileset-dir/tileset.jsonOptional flags:
nix run --refresh ./tv -- --port 8090 --viewer-port 8091 --tileset /path/to/tileset.jsonThe command starts a local static server with permissive CORS headers and prints:
- the local tileset URL
- a local viewer URL
The viewer includes a Terrain selector with three modes:
NoneCesium World Terrain(requires a Cesium Ion token)PDOK Quantized Meshviahttps://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1/collections/digitaalterreinmodel/quantized-mesh
The selected terrain mode is persisted in the URL as the terrain query parameter.
To build the viewer with only the Zoom to tileset button visible in the top toolbar:
bun run build:minimal-uiThis is equivalent to HIDE_TOP_UI=1 bun run build.
In this mode underpass colors are always enabled, and the initial camera view is set through the Cesium geocoder using State Museum, Netherlands.