1.0.54 • Published 3 years ago

@kdhy/gismap v1.0.54

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

使用说明

安装

npm i  @kdhy/gismap

使用前注意事项

因为使用cesium,需要配置静态资源目录

1.服务配置静态资源目录

2.window'CESIUM_BASE_URL' = '/static/Cesium'

Cesium使用静态资目录: node_modules/@kdhy/gismap/build/Cesium


使用

import GisMap from "@kdhy/gismap"

const gisMap = new GisMap('cesium')

使用文档目录

文档地址

基础方法

methods

方法名说明类型
setView设置视角(position) => void
cZoomIn放大() => void
cZoomOut缩小() => void
setSceneMode2D3D2/3维转换(type: 2 | 3)=> void
drawPoint绘制点(drawMpointOptions) => point
drawLine绘制线(Array<longitude,latitude,height>,lineOptions) => polyLine
drawAnimateLine绘制动态线(Array<longitude,latitude,height>,lineOptions) => polyLine
drawPolyLine绘制管线(Array<longitude,latitude,height>,lineOptions) => polyLine
remove移除元素节点(id | Entity)=>void

position:{}

名称说明类型
longitude经度number
latitude纬度number
height高度number

pointOptions:{}

名称说明类型
longitude经度number
latitude纬度number
height高度number
labellabel展示Label
tip单击展示Tip
menu右键展示Menu

lineOptions:{}

名称说明类型
width宽度number
color颜色CssColor

Label:{}

名称说明类型
show是否展示number
text文本内容string
fillColor标签填充颜色CssColor
outlineColor标签字体轮廓CssColor

Tip:{}

名称说明类型
show是否展示number
content内容HtmlString
style样式{key:value}
className外层类名string

Menu:{}

名称说明类型
show是否展示number
style样式{key:value}
className外层类名string
menuItems右键菜单Array<{text:string,type:string}>
onSelect选中回调function(type,Entity)

天气

方法名说明类型
setWeather设置天气(wether:'rain' | 'snow' | 'fog' ) => void
clearWeather关闭天气
1.0.48

3 years ago

1.0.47

3 years ago

1.0.46

3 years ago

1.0.49

3 years ago

1.0.51

3 years ago

1.0.54

3 years ago

1.0.53

3 years ago

1.0.52

3 years ago

1.0.44

4 years ago

1.0.43

4 years ago

1.0.42

4 years ago

1.0.45

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.41

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.26

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.33

4 years ago

1.0.11

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.35

4 years ago

1.0.13

4 years ago

1.0.34

4 years ago

1.0.12

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago