跳至内容

useImageryLayerScope

将“ImageryLayerCollection”操作的副作用范围化,并在卸载时自动删除

Usage

ts
TODO;

Type Definitions

typescript
import type { ImageryLayer, ImageryLayerCollection } from 'cesium';
import type { MaybeRefOrGetter } from 'vue';
export interface UseImageryLayerScopeOptions {
    /**
     * The collection of ImageryLayer to be added
     * @default useViewer().value.imageryLayers
     */
    collection?: MaybeRefOrGetter<ImageryLayerCollection | undefined>;
    /**
     * The second parameter passed to the `remove` function
     *
     * `imageryLayers.remove(imageryLayer,destroyOnRemove)`
     */
    destroyOnRemove?: boolean;
}
/**
 * Make `add` and `remove` operations of `ImageryLayerCollection` scoped,
 * automatically remove `ImageryLayer` instance when component is unmounted.
 */
export declare function useImageryLayerScope(options?: UseImageryLayerScopeOptions): import("..").UseCollectionScopeReturn<ImageryLayer, any[], any[], any>;
//# sourceMappingURL=index.d.ts.map