nebula-bmap

0.1.5 • Public • Published

nebula-bmap

A react baidu map components

You can use npm or yarn to install this package. 你可以用npm或者yarn安装

npm install nebula-bmap

or

yarn add nebula-bmap

用法 Usage

  import React, { useState } from 'react';
  import { Map, Marker } from 'nebula-bmap';

  export default () => {
    const [showMarker, setShowMarker] = useState(false);
    
    return (
      <div style={{ width: '100%', height: '100%' }}>
        <Map
          protocal="https"
          version="1.0"
          mode="webgl"
          akey="your key"
          mapStyleV2={{ styleId: "your style id" }}
          zoom={14}
          center={[108.95509, 34.27779]}
          // tile={50}
          // heading={64.5}
          scrollWheelZoom
          inertialDragging
        >
          <Marker />
        </Map>
      </div>
    );
  }

注意 Attention ⚠️

Map组件应挂载在一个有固定宽高的容器内部。

Readme

Keywords

none

Package Sidebar

Install

npm i nebula-bmap

Weekly Downloads

0

Version

0.1.5

License

MIT

Unpacked Size

349 kB

Total Files

41

Last publish

Collaborators

  • moriarty47