Skip to content

Releases: uiwjs/react-baidu-map

v2.5.2

25 Aug 09:13
Compare
Choose a tag to compare

v2.5.1

25 Aug 02:50
Compare
Choose a tag to compare

npm bundle size

Documentation v2.5.1: https://raw.githack.com/jaywcjlove/idoc/0b39c8c/index.html
Comparing Changes: v2.5.0...v2.5.1

Document [email protected]:
https://raw.githack.com/uiwjs/react-baidu-map/0b39c8c/index.html

v2.5.0

22 Aug 17:32
Compare
Choose a tag to compare

npm bundle size

Documentation v2.5.0: https://raw.githack.com/jaywcjlove/idoc/f28b74e/index.html
Comparing Changes: v2.4.0...v2.5.0

Document [email protected]:
https://raw.githack.com/uiwjs/react-baidu-map/f28b74e/index.html

v2.4.0

02 Mar 15:08
Compare
Choose a tag to compare

npm bundle size

v2.3.0...v2.4.0

v2.3.0

02 Mar 12:33
Compare
Choose a tag to compare

npm bundle size

v2.2.0...v2.3.0

import { useState } from 'react';
import { Map, APILoader, useMapContext } from '@uiw/react-baidu-map';

const Marker = () => {
  const { map } = useMapContext();

  useEffect(() => {
    if (map) {
      // 创建点标记
      const marker1 = new BMap.Marker(new BMap.Point(116.404, 39.925));
      const marker2 = new BMap.Marker(new BMap.Point(116.404, 39.915));
      // 在地图上添加点标记
      map.addOverlay(marker1);
      map.addOverlay(marker2);
    }
  }, [map]);
  return null
}

const Demo = () => {
  return (
    <div style={{ width: '100%', height: '300px' }}>
      <APILoader akay="GTrnXa5hwXGwgQnTBG28SHBubErMKm3f">
        <Map enableScrollWheelZoom={true} zoom={13}  center="北京">
          <div>
            <Marker />
          </div>
        </Map>
      </APILoader>
    </div>
  );
}

v2.2.0

02 Mar 05:16
Compare
Choose a tag to compare

npm bundle size

v2.1.2...v2.2.0

v2.1.2

28 Feb 17:58
Compare
Choose a tag to compare

npm bundle size

v2.1.1...v2.1.2

v2.1.1

28 Feb 17:44
Compare
Choose a tag to compare

npm bundle size

v2.1.0...v2.1.1

v2.1.0

28 Feb 17:09
Compare
Choose a tag to compare

npm bundle size

v2.0.8...v2.1.0

v2.0.8

19 Jan 09:39
Compare
Choose a tag to compare

npm bundle size

v2.0.7...v2.0.8