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

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.45

3 years ago

1.0.39

3 years ago

1.0.38

3 years ago

1.0.41

3 years ago

1.0.37

3 years ago

1.0.36

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.26

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.33

3 years ago

1.0.11

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.35

3 years ago

1.0.13

3 years ago

1.0.34

3 years ago

1.0.12

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago