首页 > 解决方案 > Where can I view older Mapbox GL JS API documentation?

问题描述

I'm building an app with mapbox-gl@0.44.2 and the latest version of Mapbox GL JS is 0.46.0. The API documentation on their website always reflects the latest release, but I still need to read the docs for this older version. Is it available somewhere on their website, or on their GitHub? I've looked around the mapbox GitHub repos but I don't think I'm looking at the right branches.

标签: mapbox-gl-jsmapbox-gl

解决方案


它位于 Mapbox GL JS GitHub 存储库中:

您可以执行以下操作:

  1. 转到v0.44.2树:https ://github.com/mapbox/mapbox-gl-js/tree/v0.44.2
  2. 下载存储库的 ZIP 文件(名为“克隆或下载”的绿色按钮)
  3. 为您的操作系统准备开发环境。您不需要克隆存储库,因为您之前已经下载过它。只需解压缩 ZIP 文件并yarn installmapbox-gl-js-0.44.2目录中执行。
  4. 运行npm run start-docs在本地启动文档服务器
  5. 使用打印的 URL 查看文档,在我的例子中是http://localhost:8080/mapbox-gl-js/api/

Docs_44.2


推荐阅读