Giter Site home page Giter Site logo

maptiler / vue-template-maplibre-gl-js Goto Github PK

View Code? Open in Web Editor NEW
15.0 5.0 3.0 4.79 MB

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

Home Page: https://labs.maptiler.com/vue-template-maplibre-gl-js/

License: MIT License

JavaScript 14.24% HTML 15.82% Vue 68.99% Shell 0.96%
map vue vuejs maptiler maplibre maplibre-gl-js docs template tutorial-code

vue-template-maplibre-gl-js's Introduction

Vue.js map using MapLibre GL JS

License: MIT

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.

Screenshot

vue maplibre template

(back to top)

Step-by-step tutorial - How to display a map in Vue.js using MapLibre GL JS

Documentation: How to display a map in Vue.js using MapLibre GL JS

Demo

Online demo: https://labs.maptiler.com/vue-template-maplibre-gl-js/

(back to top)

Build With

This project was generated with Vue CLI version 4.5.15.

Getting Started

Prerequisites

  • npm
    npm install npm@latest -g
  • Vue.js CLI
    npm install -g @vue/cli

(back to top)

Create an app

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

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.

(back to top)

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

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

Instead of using or developing a custom map component, you can use the Vue.js binding of maplibre-gl-js (vue-maplibre-gl).

Checkout to Get started with Vue.js and MapLibre GL JS repo to use de vue-maplibre-gl component.

vue-template-maplibre-gl-js's People

Contributors

bolollo avatar pompep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.