基于 React 封装的高德地图组件。AMap Component Based On React.
npm install slobber-react-amapuiw 组件库
bash
npm install @uiw/react-amap --save
`
使用
`jsx
import ReactDOM from 'react-dom';
import React, { useEffect, useRef, Fragment } from 'react';
import { Map, APILoader, ScaleControl, ToolBarControl, ControlBarControl, Geolocation } from '@uiw/react-amap';
const Demo = () => (
);
ReactDOM.render((
), _mount_);
`
组件
#### 容器
- APILoader 组件
- Map 组件
#### 控件
- ScaleControl 比例尺控件
- ToolBarControl 工具条控件
- MapTypeControl 工具条控件
- ControlBarControl 地图控件
- HawkEyeControl 鹰眼控件
#### 覆盖物
- Marker 点标记
- Text 文本标记
- Polyline 折线
- Circle 圆形
- Ellipse 圆形组件
- Rectangle 矩形
- BesizerCurve 贝塞尔曲线
- Polygon 多边形
- CircleMarker 圆点标记
#### 信息窗体
- InfoWindow 信息窗体
#### 右键菜单
- ContextMenu 右键菜单
#### 服务
- Weather 天气查询服务
- Geolocation 定位
#### 搜索
- AutoComplete 输入提示
开发
`bash
npm install # 安装依赖
npm run watch # 监听编译输出 js 文件, 监听编译输出 .d.ts 类型文件
npm run start # 文档网站运行
``