Skip to content

A quick way to start a web map application with Vue.js using MapLibre GL JS.

License

Notifications You must be signed in to change notification settings

maptiler/vue-template-maplibre-gl-js

Repository files navigation

Company Logo

Vue.js map using MapLibre GL JS

A quick way to start a web map application with Vue.js using MapLibre GL JS.

A simple fullscreen map application is used to showcase how to utilize MapTiler maps together with Vue.js and MapLibre GL JS for your Vue.js app.


📖 Documentation   🌐 Website   🔑 Get API Key



Table of Contents

Demo Screenshot

📦 Installation

Clone the repo to create a new Vue.js project. Run in your command-line:

git clone https://github.com/maptiler/vue-template-maplibre-gl-js.git my-vue-map

Prerequisites

This project was generated with Vue CLI version 4.5.15.

npm install -g @vue/cli

🚀 Basic Usage

Create an app

Navigate to the newly created project folder my-vue-map

cd my-vue-map

Install the NPM packages dependencies. Run in your command-line:

npm install

API KEY

Rename or copy the .env.example file to .env

cp .env.example .env

Open the .env file, ⚠️ you will need to replace YOUR_MAPTILER_API_KEY with your own MapTiler API key.

Your MapTiler account access key is on your MapTiler Cloud account page.

ℹ️ If you don't have an API KEY, you can create it for free at https://www.maptiler.com/cloud/

Run

To start your local environment, run:

npm run serve

You will find your app on address http://localhost:8080/.

Now you should see the app in your browser.

Build

To build for production, run:

npm run build

gh-pages

To deploy the app to the gh-pages branch, run:

node gh-pages.js

💡 Related Examples

Check out the full list of MapTiler examples


💬 Support




🤝 Contributing

We love contributions from the community! Whether it's bug reports, feature requests, or pull requests, all contributions are welcome:

  • Fork the repository and create your branch from main
  • If you've added code, add tests that cover your changes
  • Ensure your code follows our style guidelines
  • Give your pull request a clear, descriptive summary
  • Open a Pull Request with a comprehensive description

📄 License

This project is licensed under the MIT License – see the LICENSE file for details.


🙏 Acknowledgements

This project is built on the shoulders of giants:

  • MapTiler – Maps for developers
  • MapLibre GL JS – Open-source TypeScript library for publishing maps on your website
  • Vue.js – The Progressive JavaScript Framework

Get Your API Key FREE
Start building with 100,000 free map loads per month ・ No credit card required.


💜 Made with love by the MapTiler team

WebsiteDocumentationGitHub

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •