react-amap
react-amap是一套基于React 和高德地图的地图组件。
安装
npm i -S react-mobile-amap
文档
快速上手
引入react-amap
// 引入react-amap; // 初始化react-amapReactAMap; const screen = windowscreenheight; let AMap = null; const parameters = base: zoom: 11 center: 121474704 3122789 style: height: screen + 'px' scale: visible: true // toolBar: { // visible: true, // locate: true, // autoPosition: false, // }, autoPosition: true markers: icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b1.png' position: 1162054671 39907761 icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b2.png' position: 116368904 39913423 icon: 'http://webapi.amap.com/theme/v1.3/markers/n/mark_b3.png' position: 116305467 39807761 marker: fitView: true { AMap = map; } { } { console; } { console; }; const click = { AMap;}; ReactDOM;