react-map-esri
TypeScript icon, indicating that this package has built-in type declarations

0.9.0 • Public • Published

react-map-esri

基于 react 的地图组件

安装

npm i react-map-esri -D

使用

import { View, Map, Layer } from 'react-map-esri';

const { MapView } = View;
const { TileLayer } = Layer;

const api = 'http://192.168.8.130:8085';

class App extends React.Component{
  render(){
    return (
      <div style={{width: '100%', height: '400px'}}>
        <MapView api={api}>
          <Map>
            <TileLayer url="https://services.arcgisonline.com/arcgis/rest/services/World_Terrain_Base/MapServer" />
          </Map>
        </MapView>
      </div>
    )
  }
}

ReactDOM.render(<App />, document.getElementId('app'));

模块划分说明

├── Map
├── Graphic
├── Layer
|  ├── TileLayer -- 瓦片图层
|  ├── VectorLayer -- 矢量图层
|  └── GraphicsLayer -- 图案图层
├── Geometry
|  ├── Point -- 点
|  ├── Polyline -- 线
|  ├── Polygon -- 面
|  └── Text -- 文字
├── MapSymbol
|  ├── SimpleFillSymbol -- 填充样式
|  ├── SimpleLineSymbol -- 线样式
|  ├── SimpleMarkerSymbol -- 几何样式
|  └── TextSymbol -- 文字样式
├── Popup -- 弹框
└── Sketch -- 绘制

Package Sidebar

Install

npm i react-map-esri

Weekly Downloads

48

Version

0.9.0

License

ISC

Unpacked Size

7.23 MB

Total Files

329

Last publish

Collaborators

  • remotesc2