{"id":22490101,"url":"https://github.com/AlexLavoie42/Nuxt-Mapbox","last_synced_at":"2025-08-02T22:32:17.567Z","repository":{"id":65809070,"uuid":"600353096","full_name":"AlexLavoie42/Nuxt-Mapbox","owner":"AlexLavoie42","description":"Elegant Mapbox integration with Nuxt","archived":false,"fork":false,"pushed_at":"2024-09-10T19:30:19.000Z","size":15310,"stargazers_count":89,"open_issues_count":9,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-05T00:33:29.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexLavoie42.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-11T08:13:38.000Z","updated_at":"2024-12-04T15:47:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"7fc23187-ca9b-41a2-b9b9-4f57ec7be7ba","html_url":"https://github.com/AlexLavoie42/Nuxt-Mapbox","commit_stats":{"total_commits":391,"total_committers":9,"mean_commits":43.44444444444444,"dds":"0.36317135549872126","last_synced_commit":"44cbcf41d83f16f2f79580831469ca8560db3a81"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLavoie42%2FNuxt-Mapbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLavoie42%2FNuxt-Mapbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLavoie42%2FNuxt-Mapbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexLavoie42%2FNuxt-Mapbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexLavoie42","download_url":"https://codeload.github.com/AlexLavoie42/Nuxt-Mapbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500792,"owners_count":17930128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T17:21:49.260Z","updated_at":"2025-08-02T22:32:17.539Z","avatar_url":"https://github.com/AlexLavoie42.png","language":"Vue","funding_links":[],"categories":["Vue","Starter Kits"],"sub_categories":[],"readme":"# Nuxt-Mapbox\n## Elegant Mapbox integration with Nuxt\n\n### [📖 Check out the new docs!](https://alexlavoie42.github.io/Nuxt-Mapbox/)\n\n----------------------------------------------------------------\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n\n\u003e \n\n- [✨ \u0026nbsp;Release Notes](https://github.com/AlexLavoie42/Nuxt-Mapbox/blob/main/CHANGELOG.md)\n- [🏀 \u0026nbsp;Online playground](https://stackblitz.com/github/AlexLavoie42/Nuxt-Mapbox?file=playground%2Fpages%2Findex.vue)\n\u003c!-- - [📖 \u0026nbsp;Documentation](https://example.com) --\u003e\n\n## Features\n\n\u003c!-- Highlight some of the features your module provide here --\u003e\n- 🏗 \u0026nbsp;Easily add Mapbox to your Nuxt app with Vue components\n- 🌎 \u0026nbsp;useMapbox Composable for easy access\n- 👷 \u0026nbsp;defineMapboxMarker \u0026 defineMapboxPopup for making custom components\n- 🎛️ \u0026nbsp;defineMapboxControl for creating your own controls\n- 📖 \u0026nbsp;Persistent map instances across routes\n\n## Quick Setup\n\n1. Add `nuxt-mapbox` \u0026 `mapbox-gl` dependencies to your project\n\n```bash\nnpx nuxi@latest module add nuxt-mapbox\nnpm install --save-dev mapbox-gl\n```\n\n2. Add `nuxt-mapbox` to the `modules` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-mapbox'\n  ]\n})\n```\n\n3. Add your Mapbox API key to the `mapbox` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-mapbox'\n  ],\n  mapbox: {\n    accessToken: '{API_KEY}'\n  }\n})\n```\n\n## Usage\nView the [Mapbox GL JS Docs](https://docs.mapbox.com/mapbox-gl-js/guides/) for reference.\n\nMap instances are created with components. You can provide all the options through component props\n\nExample:\n```html\n    \u003cMapboxMap\n      map-id=\"{ID}\"\n      style=\"position: absolute; top: 0; bottom: 0; left: 250px; width: 500px;\"\n      :options=\"{\n        style: 'mapbox://styles/mapbox/light-v11', // style URL\n        center: [-68.137343, 45.137451], // starting position\n        zoom: 5 // starting zoom\n      }\"\n    /\u003e\n```\n\nYou can add Layers, Sources \u0026 Controls by nesting their respective components inside the Map\n\nExamples:\n\n```html\n    \u003cMapboxMap\n      ...\n    \u003e\n      \u003cMapboxSource \n        source-id=\"{ID}\"\n        :source=\"{\n          type: 'geojson',\n          data: '/test.geojson'\n        }\"\n      /\u003e\n      \u003cMapboxLayer\n        :layer=\"{\n          source: '{ID}',\n          id: 'geojson-layer',\n          type: 'fill'\n        }\"\n      /\u003e\n      \u003cMapboxGeolocateControl position=\"top-left\" /\u003e\n    \u003c/MapboxMap\u003e\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate type stubs\nnpm run dev:prepare\n\n# Develop with the playground\nnpm run dev\n\n# Build the playground\nnpm run dev:build\n\n# Run ESLint\nnpm run lint\n\n# Run Vitest\nnpm run test\nnpm run test:watch\n\n# Release new version\nnpm run release\n```\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-mapbox/latest.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-version-href]: https://npmjs.com/package/nuxt-mapbox\n\n[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-mapbox.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-downloads-href]: https://npmjs.com/package/nuxt-mapbox\n\n[license-src]: https://img.shields.io/npm/l/nuxt-mapbox.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[license-href]: https://npmjs.com/package/nuxt-mapbox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexLavoie42%2FNuxt-Mapbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexLavoie42%2FNuxt-Mapbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexLavoie42%2FNuxt-Mapbox/lists"}