@advisr/v-mapbox

中文文档
5.1.3发布于 2025/07/17MITTypeScriptESM + CJS零依赖近 30 天下载 2405

Maplibre (and Mapbox) with Vue 💚

原始使用文档
文档目录8 节
  1. Installation
  2. Demo
  3. Deck.gl 🆕
  4. Development
  5. Documentation
  6. Contributing
  7. Author
  8. License

V-Mapbox 🗺

npm GitHub release (latest by date including pre-releases) Total alerts DeepScan grade npm GitHub last commit GitHub contributors Maintenance

Combine powers of Vue and Mapbox GL JS (v3.x) & MaplibreGL (v4.x) 🗺

V-Mapbox is wrapper around Mapbox GL JS for >v1.x to <=v3.x & Maplibre GL JS for > v4.x library that provides vueish-way to interact with the map.

Description and documentation

Installation

# For Vue 2
$ npm i v-mapbox@legacy
# For Vue 3
$ npm i v-mapbox

Demo

Edit v-mapbox-vue-3

Deck.gl 🆕

Edit v-mapbox-with-deck-gl-geojson

Development

git clone [email protected]:vinayakkulkarni/v-mapbox.git
cd v-mapbox
npm install

Running in dev mode:

npm run serve

Build for production:

npm run build

Documentation

Start documentation site in development mode:

npm run docs:dev

Build documentation:

npm run docs:build

Inspired by KoRiGaN's Vue2Leaflet.

Contributing

  1. Fork it (https://github.com/vinayakkulkarni/v-mapbox/fork)
  2. Create your feature branch (git checkout -b feat/new-feature)
  3. Commit your changes (git commit -Sam 'feat: add feature')
  4. Push to the branch (git push origin feat/new-feature)
  5. Create a new Pull Request

Note:

  1. Please contribute using GitHub Flow
  2. Commits & PRs will be allowed only if the commit messages & PR titles follow the conventional commit standard, read more about it here
  3. PS. Ensure your commits are signed. Read why

Author

v-mapbox © Vinayak, Released under the MIT License.
Authored and maintained by Vinayak Kulkarni with help from contributors (list).

vinayakkulkarni.dev · GitHub @vinayakkulkarni · Twitter @_vinayak_k

License

MIT

FOSSA Status

版本与发布记录

@advisr/v-mapbox 共发布 4 个版本,首次发布于 2022/11/16;过去 12 个月发布了 0 个版本。

版本发布日期距今
5.1.3latest2025/07/171.3 年前
5.1.22025/07/171.3 年前
5.1.12025/07/171.3 年前
1.12.0legacy2022/11/163 年前

关于 @advisr/v-mapbox 的常见问题

@advisr/v-mapbox 是什么?

Maplibre (and Mapbox) with Vue 💚

如何安装 @advisr/v-mapbox?

在项目目录运行 npm install @advisr/v-mapbox,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:maplibre-gl(^4.0.0)、vue(^3.4.15)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@advisr/v-mapbox 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@advisr/v-mapbox 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@advisr/v-mapbox 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@advisr/v-mapbox 可以商用吗?

@advisr/v-mapbox 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@advisr/v-mapbox 的下载量有多少?

根据 npm 官方下载统计,@advisr/v-mapbox 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,405 次,日均约 80 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@advisr/v-mapbox 还在维护吗?

最新版本 5.1.3 发布于 2025/07/17(1.3 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/11/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。