Skip to content

Latest commit

 

History

History
executable file
·
61 lines (45 loc) · 1.08 KB

README.md

File metadata and controls

executable file
·
61 lines (45 loc) · 1.08 KB

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