0.0.1-beta.3 • Published 1 year ago
lowcode-map-component
lowcode-map-component
说明
npm install lowcode-map-component
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import ExampleComponent from 'lowcode-map-component';
class App extends Component {
render() {
return (
<div>
<ExampleComponent />
</div>
);
}
}
ReactDOM.render(<App />, mountNode);
API
MapComponentProps
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|
mapStyle | 地图的样式 | false | string | - | - |
accessToken | 地图的token | false | string | - | - |
viewState | DeckGL配置 | false | ViewState | - | - |
heatmapDataSource | Heatmap数据源 | false | HeatmapDataSource | - | - |
pointDataSource | point 数据源 | false | PointDataSource | - | - |
ViewState
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|
longitude | 经度 | true | number | - | - |
latitude | 纬度 | true | number | - | - |
zoom | 缩放 | false | number | - | - |
maxZoom | 最大缩放 | false | number | - | - |
pitch | - | false | number | - | - |
bearing | - | false | number | - | - |
HeatmapDataSource
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|
longitude | 经度 | true | number | - | - |
latitude | 纬度 | true | number | - | - |
weight | heatmap大小 | false | number | - | - |
PointDataSource
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|
position | 经度\/纬度 | true | number[] | - | - |
normal | - | true | number[] | - | - |
color | 颜色 | false | number | - | - |