Map Motion logo

Map Motion

Community
SpaceZephyr
map-motion

地图动效视频:用高德地图(真实路线、行政区边界、标准/卫星瓦片底图)做旅行与解说视频里的地图动画,出竖屏/横屏 MP4 和 GIF。十四种镜头:地球俯冲定位(从地球放大到某地)、Vlog「我在这里」瞄准锁定+坐标卡、落点标注、公园/景区/校园地块轮廓描边与绕行、路线描线(驾车/步行/骑行/GPX,车随线走、里程表滚动、镜头跟车、海拔剖面)、飞线航线、行政区描边高亮、一对多辐射飞线、多站旅程(路线+邮戳+照片+返程;可换成卡通形象走路、到站拍照的 vlog 模式,配原创 BGM 和音效)、片尾照片墙、全景收束、标题卡、机位揭秘(咔嚓翻出照片,可做 Live Photo)、猜地点;另有 3D 地形模式(真实山体立体、卫星贴图、地球俯冲到鸟瞰、跟着人沿轨迹走、里程/海拔/爬升/小地图/海拔剖面、沿途弹照片);十四种样式(高德标准、高德暗色、高德灰、高德复古、高德手账、卫星、境外卫星、暗色科技、极简白、水彩手账、复古纸、赛博霓虹、国风水墨、工程蓝图)。当用户说「地图动画」「地图动效」「轨迹动画」「出行轨迹视频」「旅行路线动图」「从地球放大到」「定位到某地」「飞线」「航线动画」「行政区高亮」「门店分布动画」「Vlog 地图片头」「标出某个公园/景点」「徒步/登山/骑行轨迹」「海拔剖面」「我在这里坐标卡」「3D 地形」「立体地图」「像 Google Earth 那样的轨迹」「两步路/六只脚那种 3D 轨迹回放」,或要把行程、GPX、照片位置做成地图视频时使用。

Overview

PublisherSpaceZephyr
Repositorymap-motion
Skill namemap-motion
Stars
100
Forks
9
Bundled files
76
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 76 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by SpaceZephyr on GitHub. Read the source before you install it.

Installation

Install the Map Motion AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/SpaceZephyr/map-motion/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SpaceZephyr/map-motion.git \
  .claude/skills/map-motion
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Map Motion in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Map Motion on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Map Motion is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

地图动效 map-motion

子 skill:「找机位」(照片 → 机位揭秘视频)photo-spot/;3D 地形与光线推演 map-3d/;旅行 vlog(照片 → 卡通小人沿路线走、到站拍照、配乐)travel-vlog/。流程和坑在各自目录;本文件只讲引擎。

一份「镜头表」JSON → 编译(高德解析地名、取路线和边界、算镜头)→ 逐帧渲染(Chromium 画布 + ffmpeg)。

sh
D=~/.claude/skills/map-motion/scripts
$D/make.sh 我的片子.json 成片.mp4 --gif 动图.gif           # 一键:编译 + 渲染
$D/make.sh 我的片子.json 静帧/ --stills 1,4.5,9            # 先抽几帧看构图(快)

首次使用:uv run --with playwright playwright install chromium;高德 key 见下。

工作流

  1. 定内容:问清地点/路线/日期/照片、发哪个平台(定 size)、要什么感觉(定 style)。不确定样式时,同一份 spec 换 style 各渲一帧给用户挑(至少三种)。
  2. 写 spec:从 assets/examples/ 挑最近的一份复制改。镜头类型与全部参数见 references/spec.md。
  3. 编译并核对地点:编译会逐个打印「地点 X → 高德解析结果(级别)[坐标]」。每一行都核对:同名地点会解析错(实测「香格里拉」曾被解析成某家酒店)。不对就换更具体的名字,或直接写坐标。
  4. 抽静帧:--stills 取每个镜头中段和结尾各一帧。输出末尾有自动质检(出画、文字互压、文字压照片、黑块):「质检:通过」就不用读图;报了问题,或要判断审美(构图、配色)时,才 Read 对应静帧。
  5. 出片:渲染整片(30fps 约每秒 2.5 帧画面;40 秒片子约 1.5–2 分钟),需要时加 --gif、--audio。长片放后台跑;结束只输出几行摘要(成片路径、时长、边渲边抽检的质检结论),-v 才打印逐段进度。中途看进度用 python3 scripts/status.py(一行),不要反复读日志。
  6. 交付:说清时长、文件位置、用了哪些真实数据(高德路线公里数等),以及哪些是示意。

镜头一览

type效果典型用途
globe地球自转 → 俯冲到地点,落点弹标签片头、地点引入
locate地球俯冲 → 瞄准镜锁定 → 坐标卡(经纬度滚动、海拔、日期)Vlog 片头「我在这里」
pins多个地点依次落针+涟漪打卡点、门店
route高德真实路线或 GPX 描线,车/人沿线走,可镜头跟车、里程表、海拔剖面、终点插旗自驾、徒步登山、骑行、跑步
flight大圆航线向上拱起,飞机沿线飞出差、旅行、跨城
region行政区描边 → 填色 → 写名城市群、区域介绍
area公园/景区/校园轮廓(OSM 边界)描边填色,可让小人绕一圈介绍一个地点、游园路线
radiate一个中心向多点放射飞线总部/仓库辐射、业务覆盖
trip多站旅程:逐段路线+累计里程+到站邮戳+照片+原路返程;加 avatar 进入 vlog 模式(卡通形象走路、到站咔嚓拍照、照片弹出、脚步/快门/啵/叮音效踩拍点)假期出行复盘、旅行 vlog
wall片尾照片墙:全程照片依次落下 +「N 个机位 · 共走 X km」+ 形象摇摆vlog 收尾
overview镜头框住至今所有地点片尾收束
title画面中央标题卡开场、章节
snap地球俯冲 → 机位(相机图标)+被摄地 → 取景扇形 → 取景框对焦 → 咔嚓(自动配快门声)→ 照片从机位翻折立起,背景是这张照片的虚化;live 可做 iPhone Live Photo 播放效果「这张照片在哪拍的」、机位揭秘、摄影 Vlog
guess整屏照片+「这张照片在哪拍的?」+提示+倒数,闪白露出地球,接 locate 揭晓猜地点系列、悬念片头

3D 地形模式("mode": "3d")

真立体山体(AWS Terrain Tiles 高程 + Esri 卫星,MapLibre GL 渲染)。整片是固定一套:卫星地球俯冲 → 整条轨迹 3D 鸟瞰(白线 + 标题)→ 压低贴到起点 → 跟着人走(黄线、里程、海拔、累计爬升、小地图、底部海拔剖面;到照片点停下弹照片)→ 拉回全景、出总数据。写法见 references/spec.md;流程、例子和检查命令在子 skill map-3d/。

  • 坐标一律 WGS-84(GPX、OSM、卫星、高程都是),所以国内也用 Esri 卫星;高德坐标写 "gcj": true。
  • 没有 GPX:"track": {"via": [途经点…]} 沿 OSM 小路取最短路连起来(山里 OSM 常断头,不连通就加中间点)。
  • 软件 WebGL(SwiftShader)渲染,约 1–1.5 秒一帧,30 秒片子 15–25 分钟,放后台跑;先 --stills 抽帧看。

镜头之间自动「飞过去」(van Wijk 平滑缩放:远距离先拉远再推近,和 Mapbox flyTo 同一公式),不需要手写转场。

样式

style底图适合最大推近
amap高德标准路网瓦片通用、街道级路线17.5
amap-dark高德瓦片反色夜景感、科技向17.5
amap-gray高德瓦片去色,红色路线数据可视化、新闻图解17.5
amap-sepia高德瓦片棕褐调,手写字怀旧、城市故事17.5
amap-journal高德瓦片淡暖色 + 纸纹 + 手写字,红色虚线路线旅行 vlog、citywalk 手账17.5
satellite高德卫星+路名,地球也是真实卫星图片头俯冲、户外、航线17.5
satellite-worldEsri 全球卫星(无路名),署名 Esri境外地点(高德卫星境外只有城市级,再推近是灰底)17.5
dark矢量:深底发光边界与飞线数据/业务分布8
light矢量:白底极简区域介绍、信息图8
journal矢量:纸纹水彩省份、红虚线、邮戳、手写字旅行手账8
vintage矢量:复古牛皮纸、棕墨线历史、怀旧8
neon矢量:深紫底、品红海岸线、青色发光飞线潮流、夜生活、音乐8
ink矢量:宣纸底、水墨陆地、朱砂路线与印章国风、文旅、历史路线8
blueprint矢量:蓝底白线网格、虚线路线工程、规划、科普8

矢量样式的边界是抽稀过的(约 2 km 精度),编译时自动把镜头封顶在 8 级(约一个地级市范围)并提示;要街道细节就用前三种。

高德

  • key:export AMAP_KEY=… 或写入 ~/.config/map-motion/amap_key(Web服务类型)。没 key 时编译直接报错并说明怎么申请。不要把 key 写进 spec 或项目目录。
  • API 响应缓存在 ~/.cache/map-motion/api/,瓦片缓存在 ~/.cache/map-motion/tiles/;改 spec 重编译不重复消耗配额。
  • 用户的 GPS/照片 EXIF/GPX 坐标是 WGS-84,spec 里写 "wgs84": true 转成高德坐标。
  • 海拔:elevation: true 用 OpenTopoData SRTM 30m(免费,每天约 1000 次请求,已缓存);查之前把高德坐标换回 WGS-84,否则山区高度会错。
  • 高德瓦片属非官方取用:个人/学习视频可用并保留右下角署名;商业投放需高德授权或改矢量样式。国界、南海九段线照内置数据画,不要删改。详见 references/amap.md。

要改画法时

  • 画面全在 scripts/runtime/mm.js:样式表 ST(颜色、字体、是否发光/纸纹/虚线)、各图层绘制函数(route pin region hudTitle odometer caption photo)、地球(globeTexture/globeFill 逐像素反投影)。加样式=往 ST 加一项(地球颜色用 globeOcean/globeLand 单独给,暗色样式要拉开对比),用瓦片的再加进 compile.py 的 TILED。
  • 镜头逻辑在 scripts/compile.py 的 shot_* 函数;加镜头类型=写一个 shot_xxx 并登记到 SHOTS。
  • 改完用 assets/examples/showcase.json(覆盖全部镜头)在两三种样式下抽帧回归。

踩过的坑(改代码前先看)

  • 3D:MapLibre 5.6 在地球↔地形切换时抛 clearFadeHold 错 → 用 5.24(render.py 的 VENDOR)。setData 在 worker 里异步,idle 可能先到,线会慢一帧 → t3d.js 先等 sourcedata(isSourceLoaded) 再等 idle。

  • 3D:单帧抽图看着没问题、连续出片却在远处露黑块(天空/远处地形没画)——抽帧检查要用 --from/--to 渲一小段,别只看 --stills。现在的处理:推近到 12.2 级后从地球投影换成平面投影(地球投影下雾和天空不生效;12 级前换会跳一下),底色透明、天空由 2D 画布自己画渐变,全景/片尾俯角压到 40–44° 不露地平线。

  • 3D:雪山上白字看不清 → HUD 上下压暗渐变。俯视全景按透视近大远小会出画 → 自动挑让轨迹顺着视线方向的朝向,再退 0.35 级。

  • 正射地球上用多边形填陆地会破(背面点贴地平圈后围出错误区域,整球变白)→ 现在逐像素反投影取纹理;海岸线、省界只描线。

  • 墨卡托下逐点做 ±180° 归位,环会在屏幕两侧来回跳、画出横贯全屏的线 → Pline 只对首点归位,之后按经度差连续累加。

  • 推得很近时顶点投影到几十万像素外,画布填充破成楔形 → clipRing 先按屏幕外扩框裁剪。

  • 地名先做 POI 搜索会把行政区名搜成同名商户;只信地理编码又会把「青海湖」编成乌鲁木齐同名小区 → geocode 先编码,落到兴趣点/道路/公交站/住宅区级才退 POI。编译打印的地点行仍要逐行核对。

  • 过渡阶段的透明度要从外层一路传进 drawGlobe,内部重设 globalAlpha=1 会让交叉淡化失效。

  • 从行政区推到街道级,区域填色会染满整屏 → 推近前那一镜写 clear(编译主循环统一处理)。

  • OSM 主站常 504、单个镜像会超时 → osm.py 轮流试三个镜像并缓存;按名字查会查到同名地铁站,已按 railway/public_transport 标签排除。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 16 more files.

Frequently asked questions

What does the Map Motion AI skill do?

地图动效视频:用高德地图(真实路线、行政区边界、标准/卫星瓦片底图)做旅行与解说视频里的地图动画,出竖屏/横屏 MP4 和 GIF。十四种镜头:地球俯冲定位(从地球放大到某地)、Vlog「我在这里」瞄准锁定+坐标卡、落点标注、公园/景区/校园地块轮廓描边与绕行、路线描线(驾车/步行/骑行/GPX,车随线走、里程表滚动、镜头跟车、海拔剖面)、飞线航线、行政区描边高亮、一对多辐射飞线、多站旅程(路线+邮戳+照片+返程;可换成卡通形象走路、到站拍照的 vlog 模式,配原创 BGM 和音效)、片尾照片墙、全景收束、标题卡、机位揭秘(咔嚓翻出照片,可做 Live Photo)、猜地点;另有 3D 地形模式(真实山体立体、卫星贴图、地球俯冲到鸟瞰、跟着人沿轨迹走、里程/海拔/爬升/小地图/海拔剖面、沿途弹照片);十四种样式(高德标准、高德暗色、高德灰、高德复古、高德手账、卫星、境外卫星、暗色科技、极简白、水彩手账、复古纸、赛博霓虹、国风水墨、工程蓝图)。当用户说「地图动画」「地图动效」「轨迹动画」「出行轨迹视频」「旅行路线动图」「从地球放大到」「定位到某地」「飞线」「航线动画」「行政区高亮」「门店分布动画」「Vlog 地图片头」「标出某个公园/景点」「徒步/登山/骑行轨迹」「海拔剖面」「我在这里坐标卡」「3D 地形」「立体地图」「像 Google Earth 那样的轨迹」「两步路/六只...

Why use Map Motion on TypingMind?

Because you install it once and use it with any model. Map Motion is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Map Motion in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/SpaceZephyr/map-motion/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Map Motion?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Map Motion?

As many as you like. As long as a model supports skills, you can use Map Motion with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Map Motion AI skill free?

It is published on GitHub by SpaceZephyr. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇