Czml 类
创建
typescript
const czml = await loadCzml({url:'../SampleData/simple.czml'})类型
typescript
type LoadCzml = {
(option: CzmlOptions, globeID?: string): Promise<Czml>;
};
type CzmlOptions = {
url: string;
show?: boolean;
sourceUri?: string; //当文件中包含模型图片的引用,配置基准url
isToken?: boolean; //是否需要发送验证信息 false
questType?: 'headers' | 'params'; //发送方式 'headers'
tokenKey?: string; // 信息key
token?: string; //验证信息
};判定
isCzml()
typescript
function isCzml(tar: any): tar is Czml属性
readonly id: string 唯一标识
readonly url: string url地址
show: boolean 是否显示
方法
static fromUrl 创建加载czml
typescript
fromUrl(url: string, option: CzmlOptions, globeID?: string): Promise<Czml>focus 聚焦
duration过渡时间 单位秒
typescript
focus(duration?: number): voiddestroy 销毁
typescript
destroy(): boolean