@pansy/react-mapbox-gl
TypeScript icon, indicating that this package has built-in type declarations

1.8.1 • Public • Published

React Mapbox GL

🌍 基于 mapbox-gl 封装的 React 组件库.

Forks Stars npm version

🏗 安装

# npm
$ npm install mapbox-gl @pansy/react-mapbox-gl

# yarn
$ yarn add mapbox-gl @pansy/react-mapbox-gl

# pnpm
$ pnpm i mapbox-gl @pansy/react-mapbox-gl

🔨 使用

import { Map } from '@pansy/react-mapbox-gl';

import type { MapProps } from '@pansy/react-mapbox-gl';

const config: MapProps = {
  accessToken: 'YOUR_MAPBOX_ACCESS_TOKEN',
  style: 'mapbox://styles/mapbox/dark-v11',
};

export default () => {
  return <Map {...config} />;
};

Package Sidebar

Install

npm i @pansy/react-mapbox-gl

Weekly Downloads

3

Version

1.8.1

License

MIT

Unpacked Size

223 kB

Total Files

200

Last publish

Collaborators

  • wangxingkang