mapir-react-component

2.0.7 • Public • Published

MapirReactComponent

npm version

Map.ir React wrapper for mapbox-gl-js. Expose a bunch of component meant to be simple to use for React.

Get API Key

🔑 You should first get api key from Map.ir

Installation

npm i mapir-react-component

Quick start

Import module

import Mapir from 'mapir-react-component';
import 'mapir-react-component/dist/index.css';

Set API Key

const Map = Mapir.setToken({
  transformRequest: (url) => {
    return {
      url: url,
      headers: {
        'x-api-key': 'Your_API_KEY', //Mapir api key
        'Mapir-SDK': 'reactjs',
      },
    };
  },
});

Generate Component

render () {
	return (
		<Mapir
		Map={Map}
		apiKey={'Your_API_KEY'}
		/>
	)
}

Edit mapir-react

Edit stackblitz

📖 English Documentation

📖 Persian Documentation

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.766latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.766
2.0.62
2.0.50
2.0.40
2.0.30
2.0.20
2.0.11
2.0.00
1.8.118
1.8.00
1.7.50
1.7.20
1.7.10
1.7.01
1.6.41
1.6.30
1.6.20
1.6.10
1.6.00
1.4.00
1.3.00
1.2.40
1.2.30
1.2.20
1.2.10
1.2.00
1.1.110
1.1.100
1.1.90
1.1.80
1.1.70
1.1.60
1.1.50
1.1.40
1.1.30
1.1.20
1.1.10
1.1.00
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i mapir-react-component

Weekly Downloads

65

Version

2.0.7

License

MIT

Unpacked Size

3.18 MB

Total Files

9

Last publish

Collaborators

  • mohammad.masumi
  • mh_sattarian
  • reyhanemasumi
  • alikhoshraftar