Installation

Installing Map.ir Vue Component is quite simple and straightforward.

Required Vue Package:

Install the following package via npm or yarn:


npm install leaflet
or
yarn add leaflet
                                        

ShivehMap Component:

Download the ShivehMap Vue component.

CSS:

Add the following stylesheets to your index.html head tag:

Getting started

Basic map:

Put downloaded ShivehMap folder in your desired place and import Map.vue file:


import ShivehMap from 'path/to/directory/Map';
										

Define ShivehMap component in components:


'ShivehMap': ShivehMap
										

Using Component:

Use ShivehMap component where you want

Props:

You can give props to the component

Default prop values are:


:lat="33.1375"
:lng="56.2170"
:zoom="6"
                                        

Marker:

Add Markers by giving a position:

Add popup to your markers by giving a text: