cesium 图层构建的那些事 (九)

我们来构建 cesium 单图片图层和arcgis图层

```javascript

import {ImageryLayer} from "./ImageryLayer";

//arcgis珊格服务
export class ArcGisImageryLayer extends ImageryLayer{
public imageryProvider:any;//影像提供者
constructor(option:any={}){
super(option.name);
//如果是字符串(定是url),直接变成对象
if(typeof option !== "object"){
option = {url:option};
}
option = {
enablePickFeatures: false,
...option
}
this.type = "ArcGisImageryLayer";//重写类型
this.imageryProvider = new Cesium.ArcGisMapServerImageryProvider(option);

posted @ 2022-01-20 17:39  haibalai  阅读(49)  评论(0编辑  收藏  举报