Installation

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

Required React Package:

Install the following package via npm or yarn:


npm install leaflet
or
yarn add leaflet
                                        

ShivehMap Component:

Download the ShivehMap react 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.js file:


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

Using Component:

Use ShivehMap component where you want

Props:

You can give props to the component

Default prop values are:


mapPosition: [35.7, 51.4],
mapZoom: 11
                                        

Marker:

Add Marker by giving a position: