MapStage README

项目的 README,来自 github.com/hopechen067/MapStage。合并为一个 markdown 文件:README.md。

MapStage

English | 中文

A narrative map stage for historical videos: one MapLibre engine plus one agent skill. Antique parchment basemap, routes that march, place names that fade in, cameras that follow the narration, and a seek(t) contract so HyperFrames, Remotion or Playwright can capture frame by frame.

Live site

Home, docs, examples and the Studio tuner. Satellite imagery and terrain tiles are fetched at runtime, so you need internet access. Nothing to install.

Path What
/ Home: live map hero with a scrubbable timeline
/docs/ Docs, rendered straight from mapstage/references/*.md (people and agents read the same files)
/examples/ Example library, filtered by Look / Story / Stage / Play, each with source
/studio/ Studio: tune the look, copy the preset JSON

Recent changes: CHANGELOG.md.

What it does

Three layers:

Plus Play: MapStageBoard gives games and interactive pages the same parchment map. MapStage only draws the map; the rules are yours.

Built-in rules for platform-safe output: no provincial or national border lines, no fog or vignette, Taiwan, Hainan and the South China Sea shown complete. The ten-dash line appears only on full-China shots. See mapstage/references/compliance.md.

Not in scope: interactive web-map products, a marketplace, navigation or surveying.

Demo video

Example output of this stack in a real map-story episode (Long March ep.14, 西路军). Low-res clip:

https://hopechen067.github.io/MapStage/media/long-march-ep14-demo.mp4

Longer clip (~36s): showcases/long-march-ep14/ep14-map-clip.mp4

Showcases

Still frames from the same episode.

Route and timeline
Route + timeline card
Yellow River crossing
Yellow River · date card
Terrain and campaign arrow
Terrain · route arrow
3D walled city
3D walled city (Gaotai)
Campaign area
Campaign area · tiered labels
Whole Long March route
Whole route

More files: showcases/long-march-ep14/

Item Value
Skill folder mapstage
Runtime MapLibre GL JS 5.6.0, no bundler, no npm runtime dependency
Default basemap EOX Sentinel-2 cloudless (public demo WMTS; check provider terms)
Terrain / hillshade Terrarium-encoded DEM tiles (runtime fetch; encoding: 'terrarium')
Water / roads OpenFreeMap vector tiles (OpenMapTiles); no data file in the repo, see DATA-PROVENANCE.md
Region isolate Optional parchment mask (ui.showRegionIsolate). The China outline comes from Natural Earth 10m (public domain); provincial / city shapes are simplified OSM polygons (ODbL). Narrative silhouettes, not official borders
License MIT for code and docs; showcase media and third-party terms in LICENSE-EXCEPTIONS.md / NOTICE.md

Install as an agent skill

The skill lives in mapstage/. Copy that folder into your agent skills directory and reload skills.

git clone https://github.com/hopechen067/MapStage.git
cp -R MapStage/mapstage ~/.grok/skills/mapstage
# or: ~/.claude/skills/mapstage, ~/.codex/skills/mapstage

On Windows (PowerShell):

git clone https://github.com/hopechen067/MapStage.git
Copy-Item -Recurse -Force .\MapStage\mapstage (Join-Path $env:USERPROFILE ".grok\skills\mapstage")

Then tell your agent:

请使用 mapstage skill。
官网与调参台:https://hopechen067.github.io/MapStage/
仓库:https://github.com/hopechen067/MapStage
我会在 Studio 里调好风格后导出 JSON,请按 SKILL.md / references 应用到地图场景。

Style workflow: open the Studio, tune, Copy JSON, paste to your agent.

Run locally

Only needed for offline work or development. Do not open pages as file://.

git clone https://github.com/hopechen067/MapStage.git
cd MapStage
node mapstage/site/serve.mjs      # http://127.0.0.1:8770/  (same layout as the live site)

Only the Studio:

cd mapstage/tuner
python -m http.server 8765        # then open http://127.0.0.1:8765/

Static check (Node on PATH; expect verify ok at the end):

cd mapstage/tuner
node verify.mjs

Build the full static site into out/_site:

node mapstage/site/build.mjs

The build refuses to run if data of unconfirmed license is present (see DATA-PROVENANCE.md).

Map tiles

Satellite, DEM and vector tiles are not bundled; they are fetched at runtime from configured URLs.

  1. Read NOTICE.md.
  2. Defaults are in mapstage/tuner/map-tiles.config.js.
  3. Personal endpoints go in map-tiles.config.local.js (gitignored); see map-tiles.config.example.js.

EOX public tiles are typically non-commercial and need attribution. This project does not grant rights to any commercial map vendor.

Attribution & compliance

MapStage (hopechen067/MapStage)

正在搜索数据库…

这是什么?MapStage 是一个开源的地图与地球实时调参器——你可以调整卫星影像、分层设色地形、3D 地形和区域隔离效果,然后把外观导出为 JSON 预设。它还可以作为可安装的「智能体技能」提供,让 AI 编码智能体驱动同一个调参器。
这是我在浏览器里打开的网页应用,还是作为智能体技能安装的东西?两者都是——GitHub Pages 上托管了一个可直接使用、无需安装的在线演示;仓库里还包含一个「mapstage/」文件夹,可以单独安装为 AI 编码智能体的技能。
怎么开始使用调参器?只需打开在线演示,用「Copy JSON」导出预设——无需安装。若要离线编辑或运行,克隆仓库并运行本地调参器命令,然后打开终端中打印的本地地址(而不是 file://)。
查看卫星影像和地形需要联网吗?需要——默认的 EOX Sentinel-2 卫星底图和 Mapterhorn DEM 地形/山体阴影是运行时从外部服务器获取的,并未随项目打包。
默认卫星瓦片可以商用吗?默认不可以——EOX 瓦片通常仅限非商业用途且需要署名,项目也不授予任何商业地图厂商权利;你可以通过一个被 gitignore 的本地配置文件换成自己已获授权的瓦片地址。
能用自己的地图瓦片代替默认卫星影像吗?可以——创建一个 map-tiles.config.local.js(已被 gitignore),指向你获得使用授权的任意瓦片地址;它会覆盖默认的 EOX Sentinel-2 无云底图。
「区域隔离」是做什么的?它是一种可选模式,把选定的区域从周围地图中隔离出来,变成一个独立的 3D 地形岛。
「城市层级」功能是什么?HanCity3D 按层级渲染聚落——都城、大型、中型、小型、关隘、驿站和 ordos——让你在缩放时控制哪些城市和标记出现。
我在调参器里做出的外观能保存复用吗?可以——「Copy JSON」按钮会导出包含相机位置和资源开关的带版本预设,你可以把它粘贴回调参器或智能体中。
大小
46 MB
星标
532
时长
3个月
提交 · 90 天