From 37429f450eee2ad249c94c976ff0d53dc0a9ead8 Mon Sep 17 00:00:00 2001 From: Pavel Galkin Date: Sun, 13 Jan 2019 14:14:18 +0300 Subject: [PATCH] Readme update --- README.MD | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/README.MD b/README.MD index a1c4ef2..7bb05ba 100755 --- a/README.MD +++ b/README.MD @@ -16,29 +16,15 @@ vue-yandex-maps is a plugin for vue.js that adds yandex-map custom element. npm install vue-yandex-maps --save ``` -### CommonJS - -You can use any build tool which supports `commonjs`: - -```JavaScript -// register globally -const YmapPlugin = require('vue-yandex-maps'); -Vue.use(YmapPlugin) - -// or for a single instance -const { yandexMap, ymapMarker } = require('vue-yandex-maps'); -new Vue({ - components: { yandexMap, ymapMarker } -}) - -``` - -Or in ES2015: - ```JavaScript // register globally import YmapPlugin from 'vue-yandex-maps' -Vue.use(YmapPlugin) +const options = { // you may define your apiKey, lang and version or skip this. + apiKey: 'xxx', // '' by default + lang: 'ru_RU', // 'ru_RU' by default + version: '2.1' // '2.1' by default +} +Vue.use(YmapPlugin, options) // or for a single instance import { yandexMap, ymapMarker } from 'vue-yandex-maps' @@ -63,7 +49,7 @@ If you have a lot of markers on your map i strongly recommend you to use map att You may define placemarks on your map by using `` tag or set an array of objects with placemark options through `` attribute `placemarks` ([interface description](https://tech.yandex.ru/maps/doc/jsapi/2.0/ref/reference/GeoObject-docpage/)). You also can use both methods together.
You must define `markerId` for every marker on your map in any case fo setting (through map attribute `placemarks` or using `ymap-marker` components).
The Map instance rerender when changed array with markers or marker properties if marker is a component.
-Also map watch property `coords` and react without rerender, when it changed. +Also map watch property `coords` and react without rerender, when it changed. Type of marker in `marker-type` attribute can be: @@ -74,7 +60,7 @@ Type of marker in `marker-type` attribute can be: * Circle ```HTML - - -