Skip to content
master
Switch branches/tags
Code
This branch is 60 commits ahead, 16 commits behind soal/vue-mapbox:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MapirVueComponent

npm version

Map.ir Vue wrapper for mapbox-gl-js. Expose a bunch of component meant to be simple to use for Vue.

Get API Key

🔑 You should first get api key from Map.ir

Installation

npm i mapir-vue

Quick start

Template

<template>
  <div id="app">
    <mapir :center="center" :apiKey="apiKey"></mapir>
  </div>
</template>

Script

<script>
  import { mapir } from "mapir-vue";

  export default {
    name: "App",
    components: { mapir },
    data() {
      return {
        apiKey: YOUR_API_KEY,
        center: [51.420296, 35.732379]
      };
    }
  };
</script>

html

<style>
  #app {
    width: 90vw;
    height: 90vh;
  }
</style>

Edit Vue Template

📖 English Documentation