Newton's Preposterous Miscalculation

    mapir-react-component

    2.0.6 • 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

    Install

    npm i mapir-react-component

    DownloadsWeekly Downloads

    198

    Version

    2.0.6

    License

    MIT

    Unpacked Size

    3.19 MB

    Total Files

    9

    Last publish

    Collaborators

    • mohammad.masumi
    • mh_sattarian
    • reyhanemasumi
    • alikhoshraftar
    • soudabe