Skip to content

map-ir/mapir-vue

 
 

Repository files navigation

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

About

Map.ir Vue component based on mapboxgl.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.6%
  • Vue 43.3%
  • HTML 1.6%
  • Stylus 0.5%