1.0.54 • Published 1 year ago

@kdhy/gismap v1.0.54

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year 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

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.49

1 year ago

1.0.51

1 year ago

1.0.54

1 year ago

1.0.53

1 year ago

1.0.52

1 year ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.45

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.41

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.26

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.33

2 years ago

1.0.11

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.35

2 years ago

1.0.13

2 years ago

1.0.34

2 years ago

1.0.12

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago