← 返回
未分类
mapbox
Build, debug, and integrate Mapbox apps and APIs, including Mapbox GL JS map setup, styles, sources/layers, markers/popups, geocoding, directions, static ima...
构建、调试、集成 Mapbox 应用与 API,涵盖 GL JS 地图配置、样式、数据源/图层、标记/弹窗、地理编码、路线、静态图像等。
未分类
clawhub
v1.0.0 1 版本 100000 Key: 无需
#latest
概述
Mapbox
Use this skill for practical Mapbox platform work in web apps and API integrations.
Workflow
- Confirm the runtime first: plain HTML, Vite, React, Next.js, or another framework.
- Confirm which Mapbox surface is involved: GL JS map rendering, styles, tilesets, geocoding, directions, or static images.
- Start with the smallest working map before adding custom sources, layers, controls, or API calls.
- Keep access tokens out of source files and examples unless the user explicitly wants a local-only demo.
- For bugs, isolate whether the failure is in container sizing, token/scopes, style/source IDs, coordinate order, or layer order.
Implementation Guardrails
- Prefer
mapbox-gl with explicit imports and explicit CSS loading. - Always ensure the map container has a real height before debugging rendering.
- Use
lng, lat order consistently for Mapbox coordinate arrays. - Add sources before layers, and keep layer IDs stable so updates are easy.
- Prefer GeoJSON for lightweight overlays; move to vector tiles or tilesets for larger datasets.
- In React or other SPA frameworks, remove the map instance during teardown to avoid leaks.
- Treat the access token as configuration. Read it from environment or runtime config instead of hardcoding it.
Common Failure Checks
- Blank map: verify token, style URL, CSS import, and container height.
- Layer not visible: verify source exists, source-layer matches, zoom bounds, and paint/layout visibility.
- Wrong location: verify coordinate order and CRS assumptions; Mapbox expects WGS84
lng,lat. - Performance issues: reduce marker count, cluster point data, and prefer data-driven layers over many DOM markers.
- API failures: verify token scopes, endpoint type, rate limits, and request parameters.
Task Boundaries
- Use this skill for Mapbox-specific implementation, debugging, and integration patterns.
- For generic CRS/projection reasoning, use
project or wgs84. - For deterministic desktop GIS batch processing, use
qgis. - For CesiumJS globe rendering, use
cesium.
OpenClaw + ClawHub Notes
- Keep examples generic, portable, and token-safe.
- Do not hardcode private datasets, private style URLs, or machine-specific paths.
- For clawhub.ai publication, keep content reproducible and semver-friendly; put detailed examples in references instead of bloating
SKILL.md.
Reference Docs In This Skill
- Read
{baseDir}/references/patterns.md when generating or fixing Mapbox GL JS or API integration code.
版本历史
共 1 个版本
-
v1.0.0
当前
2026-03-31 01:11 安全 安全
安全检测
腾讯云安全 (Sanbu)
安全,无风险
查看报告
🔗 相关推荐
office-efficiency
jvy
面向中国用户的WPS Office工作流:创建、编辑、审阅、转换及排查.docx/.xlsx/.pptx及WPS格式的文字/表格/演示文档。
★ 47
📥 23,902
dev-programming
larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72
📥 181,809
dev-programming
steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677
📥 327,219