0.1.5 • Published 4 years ago

nebula-bmap v0.1.5

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

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组件应挂载在一个有固定宽高的容器内部。

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago