0.1.11 • Published 4 years ago

ymaps-vue-components v0.1.11

Weekly downloads
34
License
MIT
Repository
github
Last release
4 years ago

ymaps-vue-components (vue 3)

Introduction

ymaps-vue-components is a library for vue.js version 3. The library consists of components. You can use them to connect and work with the yandex map api.

The library is currently under active development. Components for working with the placemark, polygon, and object manager are already available.

Install

run command

npm install ymaps-vue-components

add lines "import plugin" and "using a plugin" in your src/main.js file

// src/main.js

import { createApp } from 'vue';
import App from './App.vue';
import ymapsVueComponents from 'ymaps-vue-components'; // import plugin

const app = createApp(App);

app.use(ymapsVueComponents); // using a plugin
app.mount('#app');

Base usage

<template>
  <div class="map-box">
    <yandex-maps>
      <yandex-map v-model:center="mapCenter">
        <yandex-placemark v-model:coord="placemark" />
      </yandex-map>
    </yandex-maps>
  </div>
</template>

<script>
import { ref } from 'vue';

export default {
  setup() {
    const mapCenter = ref([58.01045, 56.229434]);
    const placemark = ref([58.01045, 56.229434]);

    return {
      mapCenter,
      placemark
    }
  }
};
</script>

<style>
.map-box {
  height: 400px;
}
</style>

Examples

Base usage: https://codesandbox.io/s/ymap-vue-components-base-usage-uzqdw

0.1.10

4 years ago

0.1.11

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago