@poor-knight/cesium-utils 0.5.4 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium-utils.cjs +29 -21
- package/dist/cesium-utils.d.ts +70 -0
- package/dist/cesium-utils.js +3582 -2504
- package/dist/cesium-utils.umd.cjs +31 -23
- package/package.json +2 -1
package/dist/cesium-utils.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Point } from 'geojson';
|
|
|
10
10
|
import { Popup } from 'cesium-extends';
|
|
11
11
|
import { Viewer } from 'cesium';
|
|
12
12
|
import { WebMapServiceImageryProvider } from 'cesium';
|
|
13
|
+
import { WebMapTileServiceImageryProvider } from 'cesium';
|
|
13
14
|
|
|
14
15
|
declare type Cartesian3Like = Cesium.Cartesian3 | {
|
|
15
16
|
x: number;
|
|
@@ -318,6 +319,7 @@ export declare class ShipLayer extends default_2<{
|
|
|
318
319
|
/**显隐entity,回调返回显示隐藏的状态,不传Fn时默认显示所有 */
|
|
319
320
|
private hookFilterEntityFn?;
|
|
320
321
|
hideEntityByCondition(validateFn?: (entity: Cesium.Entity) => boolean): void;
|
|
322
|
+
private getHideAfterSomeMinutesAndByDistance;
|
|
321
323
|
}
|
|
322
324
|
|
|
323
325
|
export declare class WmsLayer implements Layer {
|
|
@@ -349,4 +351,72 @@ export declare class WmsLayerController extends EventEmitter<{
|
|
|
349
351
|
private destroyHandler;
|
|
350
352
|
}
|
|
351
353
|
|
|
354
|
+
declare interface WmtsCapabilities {
|
|
355
|
+
Capabilities: {
|
|
356
|
+
Contents: {
|
|
357
|
+
Layer: {
|
|
358
|
+
Format: string[];
|
|
359
|
+
InfoFormat: string[];
|
|
360
|
+
Style: {
|
|
361
|
+
'ows:Identifier': string;
|
|
362
|
+
};
|
|
363
|
+
TileMatrixSetLink: {
|
|
364
|
+
TileMatrixSet: string;
|
|
365
|
+
TileMatrixSetLimits: {
|
|
366
|
+
TileMatrixLimits: {
|
|
367
|
+
TileMatrix: number;
|
|
368
|
+
MinTileRow: number;
|
|
369
|
+
MaxTileRow: number;
|
|
370
|
+
MinTileCol: number;
|
|
371
|
+
MaxTileCol: number;
|
|
372
|
+
}[];
|
|
373
|
+
};
|
|
374
|
+
}[];
|
|
375
|
+
'ows:Identifier': string;
|
|
376
|
+
'ows:WGS84BoundingBox': {
|
|
377
|
+
'ows:LowerCorner': string;
|
|
378
|
+
'ows:UpperCorner': string;
|
|
379
|
+
};
|
|
380
|
+
}[];
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* WMTS 图层
|
|
387
|
+
* 使用 Cesium 的 WebMapTileServiceImageryProvider 创建并管理多个 WMTS 影像图层,
|
|
388
|
+
* 通过 key 与 zIndex 控制显隐与叠加顺序。
|
|
389
|
+
*/
|
|
390
|
+
export declare class WmtsLayer implements Layer {
|
|
391
|
+
private ctrl;
|
|
392
|
+
key: string;
|
|
393
|
+
options: Partial<WebMapTileServiceImageryProvider.ConstructorOptions> & Pick<WebMapTileServiceImageryProvider.ConstructorOptions, 'layer'>;
|
|
394
|
+
/** 图层的层级,数值越小,图层越靠下,仅在同一 WmtsLayerController 实例范围内生效 */
|
|
395
|
+
zIndex: number;
|
|
396
|
+
constructor(ctrl: WmtsLayerController, key: string, options: Partial<WebMapTileServiceImageryProvider.ConstructorOptions> & Pick<WebMapTileServiceImageryProvider.ConstructorOptions, 'layer'>,
|
|
397
|
+
/** 图层的层级,数值越小,图层越靠下,仅在同一 WmtsLayerController 实例范围内生效 */
|
|
398
|
+
zIndex?: number);
|
|
399
|
+
show(viewer: Viewer): void;
|
|
400
|
+
hide(viewer: Viewer): void;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** WMTS 图层控制器 */
|
|
404
|
+
export declare class WmtsLayerController extends EventEmitter<'init' | 'initFail'> {
|
|
405
|
+
/** 不包含 layer 与 style 的基础构造参数,由每个 WmtsLayer 实例提供其自身的 layer 与 style */
|
|
406
|
+
private args;
|
|
407
|
+
Capabilities?: WmtsCapabilities;
|
|
408
|
+
ready: Promise<void>;
|
|
409
|
+
constructor(
|
|
410
|
+
/** 不包含 layer 与 style 的基础构造参数,由每个 WmtsLayer 实例提供其自身的 layer 与 style */
|
|
411
|
+
args: Omit<WebMapTileServiceImageryProvider.ConstructorOptions, 'layer' | 'style'>);
|
|
412
|
+
private layerMap;
|
|
413
|
+
private showLayers;
|
|
414
|
+
private imgLayerMap;
|
|
415
|
+
registerLayer(layer: WmtsLayer): void;
|
|
416
|
+
showLayer(viewer: Viewer, key: string): void;
|
|
417
|
+
hideLayer(viewer: Viewer, key: string): void;
|
|
418
|
+
/** 根据 showLayers 刷新 WMTS 图层叠加顺序 */
|
|
419
|
+
private update;
|
|
420
|
+
}
|
|
421
|
+
|
|
352
422
|
export { }
|