cesiumlayer

1.0.4 • Public • Published

cesium-layer

Version: 1.0.0

install

npm install cesiumlayer --save

说明

对地形、影像、3dtiles等类型的图层进行封装。

地形 TerrainLayer

同一时间只能有一个地形,支持Cesium中所有的地形类型,支持在Viewer创建之前创建图层并用于Viewer默认地形初始化。

影像

WMSLayer,
ArcgisMapLayer,
UrlTemplateLayer,
SingleTileLayer,
IonLayer,
TileMapServiceLayer,
WebMapTileServiceLayer
支持wms、arcgismap、urltemplate、singletile、ion、tms、wmts等类型

3dtiles Cesium3DTilesetLayer

支持 Cesium3DTileset 类型数据加载显示

参数说明

统一参数结构

{
    type:'3dtiles',
    url:'xxxxx',
    name:'this is test',
    ...cesiumParameters
}

其中 cesiumParameters是指Cesium官方提供的参数

功能说明

图层加载 add(options)
图层移除 remove(name,destroy)
图层全部移除 removeAll(destroy)
移除多个图层 removeLayers(layerObjOrNames)
移除基础底图 removeBaseLayers() 
移除非底图的图层 removeNonBaseLayers()
移除某类图层 removeByType(type)
图层是否存在 isExist(name)
获取图层对象 get(nameOrIndex)

针对图层对象的功能

添加 add(options) 移除 remove(destroy) 上浮(非地形图层)raise 置顶(非地形图层)raiseToTop 下沉(非地形图层)lower 置底(非地形图层)lowerToBottom 裁切 clip 设置透明度(非地形图层)setOpacity

Readme

Keywords

Package Sidebar

Install

npm i cesiumlayer

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

79.5 kB

Total Files

7

Last publish

Collaborators

  • joysino