You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DC.d.ts 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158
  1. /**
  2. * @Author: Caven
  3. * @Date: 2022-07-16 11:51:07
  4. */
  5. declare interface ImageryProvider {
  6. defaultAlpha: Number | undefined
  7. defaultBrightness: Number | undefined
  8. defaultContrast: Number | undefined
  9. defaultDayAlpha: Number | undefined
  10. defaultGamma: Number | undefined
  11. defaultHue: Number | undefined
  12. defaultNightAlpha: Number | undefined
  13. defaultSaturation: Number | undefined
  14. readonly readyPromise: Promise<Boolean>
  15. }
  16. declare interface TerrainProvider {
  17. readonly readyPromise: Promise<Boolean>
  18. }
  19. declare interface Weather {
  20. readonly fog: any
  21. readonly rain: any
  22. readonly snow: any
  23. readonly cloud: any
  24. }
  25. declare interface Widget {
  26. enable: Boolean
  27. DEFAULT_MENU: Array<any>
  28. config:JSON
  29. setWrapper(wrapper: String | HTMLElement): Widget
  30. setContent(content: String | HTMLElement): Widget
  31. showAt(position: any, content: String | HTMLElement): Widget
  32. addBaseLayer(baseLayer:ImageryProvider,splitDirection?:Number): Widget
  33. addTileset(tileset:any): Widget
  34. }
  35. declare module 'dc' {
  36. export enum MouseEventType {
  37. LEFT_DOWN = 0,
  38. LEFT_UP = 1,
  39. CLICK = 2,
  40. DB_CLIC = 3,
  41. RIGHT_DOWN = 5,
  42. RIGHT_UP = 6,
  43. RIGHT_CLICK = 7,
  44. MOUSE_MOVE = 5,
  45. WHEEL = 16,
  46. MOUSE_OVER = 'mouseover',
  47. MOUSE_OUT = 'mouseout'
  48. }
  49. export enum ImageryType {
  50. AMAP = 'amap',
  51. BAIDU = 'baidu',
  52. GOOGLE = 'google',
  53. TDT = 'tdt',
  54. TENCENT = 'tencet',
  55. ARCGIS = 'arcgis',
  56. SINGLE_TILE = 'single_tile',
  57. WMS = 'wms',
  58. WMTS = 'wmts',
  59. XYZ = 'xyz',
  60. COORD = 'coord',
  61. GRID = 'grid',
  62. MAPBOX = 'mapbox',
  63. MAPBOX_STYLE = 'mapbox_style',
  64. TMS = 'tms'
  65. }
  66. export enum TerrainType {
  67. NONE = 'none',
  68. XYZ = 'xyz',
  69. ARCGIS = 'arcgis',
  70. GOOGLE = 'google',
  71. VR = 'vr'
  72. }
  73. export enum TrackViewMode {
  74. FP = '1',
  75. TP = '2',
  76. TRACKED = 'tracked',
  77. FREE = 'free'
  78. }
  79. export class DomUtil {
  80. static get(id: String): HTMLElement
  81. static getStyle(el: HTMLElement, style: JSON): any
  82. static create(tagName: String, className?: String, container?: HTMLElement): HTMLElement
  83. static remove(el: HTMLElement): void
  84. static empty(el: HTMLElement): void
  85. static hasClass(el: HTMLElement, name: String): Boolean
  86. static addClass(el: HTMLElement, name: String): void
  87. static removeClass(el: HTMLElement, name: String): void
  88. static setClass(el: HTMLElement, name: String): void
  89. static getClass(el: HTMLElement): String
  90. static createSvg(width: Number, height: Number, path: String, container?: HTMLElement): SVGElement
  91. static parseDom(domStr: String, withWrapper?: Boolean, className?: String): HTMLDivElement | Array<ChildNode>
  92. }
  93. export class Util {
  94. static uuid(prefix?: String): String
  95. static merge(dest: JSON, sources: any): JSON
  96. }
  97. export class Position {
  98. constructor(lng: Number, lat: Number, alt?: Number, heading?: Number, pitch?: Number, roll?: Number)
  99. lng: Number
  100. lat: Number
  101. alt: Number
  102. heading: Number
  103. pitch: Number
  104. roll: Number
  105. serialize(): Object;
  106. distance(target: Position): Number
  107. copy(): Position
  108. toArray(): Array<Number>
  109. toObject(): Object
  110. static fromArray(arr: Array<Number | String>): Position
  111. static fromString(str: String): Position
  112. static fromObject(obj: Object): Position
  113. static deserialize(valStr: JSON): Position
  114. }
  115. export class Parse {
  116. static parsePosition(position: String | Array<Number> | JSON | Position): Position
  117. static parsePositions(positions: String | Array<String | Array<Number> | JSON | Position>): Array<Position>
  118. static parsePointCoordToArray(position: String | Array<Number> | JSON | Position): Array<Number>
  119. static parsePolylineCoordToArray(positions: String | Array<String | Array<Number> | JSON | Position>): Array<Array<Number>>
  120. static parsePolygonCoordToArray(positions: String | Array<String | Array<Number> | JSON | Position>): Array<Array<Array<Number>>>
  121. }
  122. export class Transform {
  123. static transformCartesianToWGS84(cartesian: any): Position
  124. static transformWGS84ToCartesian(position: Position): any
  125. static transformWGS84ToCartographic(position: Position): any
  126. static transformCartesianArrayToWGS84Array(cartesianArr: Array<any>): Array<Position>
  127. static transformWGS84ArrayToCartesianArray(WGS84Arr: Array<Position>): Array<any>
  128. static transformWGS84ToMercator(position: Position): Position
  129. static transformMercatorToWGS84(position: Position): Position
  130. static transformWindowToWGS84(position: Position, viewer: Viewer): Position
  131. static transformWGS84ToWindow(position: Position, viewer: Viewer): any
  132. }
  133. export class Math {
  134. static toDegrees(radians: Number): Number
  135. static toRadians(degrees: Number): Number
  136. static log2(num: Number): Number
  137. static area(positions: Array<Position>): Number
  138. static bounds(positions: Array<Position>, expand?: Number): Number
  139. static center(positions: Array<Position>): Position
  140. static curve(positions: Array<Position>, options: JSON): Array<Position>
  141. static distance(positions: Array<Position>): Number
  142. static heading(start: Position, end: Position): Number
  143. static midPosition(start: Position, end: Position): Position
  144. static parabola(start: Position, end: Position, height?: Number, count?: Number): Array<Array<Number>>
  145. }
  146. export class JulianDate {
  147. constructor(julianDay?: Number, secondsOfDay?: Number, timeStandard?: any)
  148. static addDays(julianDate: JulianDate, days: Number, result?: JulianDate): JulianDate
  149. static addHours(julianDate: JulianDate, hours: Number, result?: JulianDate): JulianDate
  150. static addMinutes(julianDate: JulianDate, hours: Number, result?: JulianDate): JulianDate
  151. static addSeconds(julianDate: JulianDate, seconds: Number, result?: JulianDate): JulianDate
  152. static clone(julianDate: JulianDate, result?: JulianDate): JulianDate
  153. static daysDifference(left: JulianDate, right: JulianDate): Number
  154. static greaterThan(left: JulianDate, right: JulianDate): Boolean
  155. static greaterThanOrEquals(left: JulianDate, right: JulianDate): Boolean
  156. static lessThan(left: JulianDate, right: JulianDate): Boolean
  157. static lessThanOrEquals(left: JulianDate, right: JulianDate): Boolean
  158. static now(result?: JulianDate): Boolean
  159. static secondsDifference(left: JulianDate, right: JulianDate): Number
  160. }
  161. export class ImageryLayerFactory {
  162. static createAmapImageryLayer(options: JSON): ImageryProvider
  163. static createBaiduImageryLayer(options: JSON): ImageryProvider
  164. static createGoogleImageryLayer(options: JSON): ImageryProvider
  165. static createTdtImageryLayer(options: JSON): ImageryProvider
  166. static createTencentImageryLayer(options: JSON): ImageryProvider
  167. static createArcGisImageryLayer(options: JSON): ImageryProvider
  168. static createSingleTileImageryLayer(options: JSON): ImageryProvider
  169. static createWMSImageryLayer(options: JSON): ImageryProvider
  170. static createWMTSImageryLayer(options: JSON): ImageryProvider
  171. static createXYZImageryLayer(options: JSON): ImageryProvider
  172. static createCoordImageryLayer(options: JSON): ImageryProvider
  173. static createGridImageryLayer(options: JSON): ImageryProvider
  174. static createMapboxImageryLayer(options: JSON): ImageryProvider
  175. static createMapboxStyleImageryLayer(options: JSON): ImageryProvider
  176. static createTMSImageryLayer(options: JSON): ImageryProvider
  177. static createImageryLayer(type: ImageryType, options: JSON): ImageryProvider
  178. }
  179. export class TerrainFactory {
  180. static createEllipsoidTerrain(options: JSON): TerrainProvider
  181. static createUrlTerrain(options: JSON): TerrainProvider
  182. static createGoogleTerrain(options: JSON): TerrainProvider
  183. static createArcgisTerrain(options: JSON): TerrainProvider
  184. static createVRTerrain(options: JSON): TerrainProvider
  185. static createTerrain(type: TerrainType, options: JSON): TerrainProvider
  186. }
  187. export class Viewer {
  188. constructor(id: String | HTMLElement, options?: JSON)
  189. readonly delegate: any
  190. readonly dcContainer: HTMLElement
  191. readonly scene: any
  192. readonly camera: any
  193. readonly canvas: HTMLCanvasElement
  194. readonly dataSources: any
  195. readonly imageryLayers: any
  196. readonly terrainProvider: any
  197. readonly entities: any
  198. readonly postProcessStages: any
  199. readonly clock: any
  200. readonly cameraPosition: Position
  201. readonly resolution: Number
  202. readonly viewBounds: any
  203. readonly level: Number
  204. readonly weather:Weather
  205. readonly effect:Effect
  206. readonly compass:Widget
  207. readonly contextMenu:Widget
  208. readonly distanceLegend:Widget
  209. readonly hawkeyeMap:Widget
  210. readonly loadingMask:Widget
  211. readonly locationBar:Widget
  212. readonly mapSplit:Widget
  213. readonly mapSwitch:Widget
  214. readonly popup:Widget
  215. readonly sceneSplit:Widget
  216. readonly tilesetSplit:Widget
  217. readonly tooltip:Widget
  218. readonly zoomController:Widget
  219. setOptions(options: JSON): Viewer
  220. setPitchRange(min?: Number, Max?: Number): Viewer
  221. changeSceneMode(sceneMode: Number, duration?: Number): Viewer
  222. changeMouseMode(mouseMode: Number): Viewer
  223. addBaseLayer(baseLayers: any | Array<any>, options?: JSON): Viewer
  224. changeBaseLayer(index: Number): Viewer
  225. getImageryLayerInfo(windowPosition: any): Promise<any>
  226. addTerrain(terrain: any, options?: JSON): Viewer
  227. changeTerrain(index: Number): Viewer
  228. removeTerrain(): Viewer
  229. addLayerGroup(layerGroup: LayerGroup): Viewer
  230. removeLayerGroup(layerGroup: LayerGroup): Viewer
  231. getLayerGroup(id: String): LayerGroup
  232. addLayer(layer: Layer): Layer
  233. removeLayer(layer: Layer): Layer
  234. getLayer(id: String): Layer
  235. getLayers(): Array<Layer>
  236. eachLayer(method: Function, context: any): Viewer
  237. flyTo(targer: Overlay | Layer, duration?: Number): Viewer
  238. zoomTo(targer: Overlay | Layer): Viewer
  239. flyToPosition(position: String | Array<Number> | JSON | Position, completeCallback?: Function, duration?: Number): Viewer
  240. zoomToPosition(position: String | Array<Number> | JSON | Position, completeCallback?: Function): Viewer
  241. flyToBounds(bounds: String | Array<Number>, hpr: JSON, completeCallback?: Function, duration?: Number): Viewer
  242. zoomToBounds(bounds: String | Array<Number>, hpr: JSON, completeCallback?: Function): Viewer
  243. on(type: String | Number, callback: Function, context: any): Viewer
  244. off(type: String | Number, callback: Function, context: any): Viewer
  245. destroy(): Viewer
  246. exportScene(name: String): Viewer
  247. use(plugin: any): Viewer
  248. }
  249. export class LayerGroup {
  250. constructor(id: String)
  251. readonly id: String
  252. readonly type: String
  253. readonly state: String
  254. show: Boolean
  255. addLayer(layer: Layer): LayerGroup
  256. removeLayer(layer: Layer): LayerGroup
  257. getLayer(id: String): Layer
  258. getLayers(): Array<Layer>
  259. addTo(viewer: Viewer): LayerGroup
  260. remove(): LayerGroup
  261. }
  262. export class Layer {
  263. constructor(id: String)
  264. readonly layerId: String
  265. readonly id: String
  266. readonly delegate: any
  267. readonly state: String
  268. show: Boolean
  269. attr: Object
  270. addOverlay(overlay: Overlay): Layer
  271. addOverlays(overlays: Array<Overlay>): Layer
  272. removeOverlay(overlay: Overlay): Layer
  273. getOverlay(overlayId: String): Overlay
  274. getOverlayById(id: String): Overlay
  275. getOverlaysByAttr(attrName: String, attrVal: any): Overlay
  276. eachOverlay(method: Function, context: any): Layer
  277. getOverlays(): Array<Overlay>
  278. clear(): Layer
  279. remove(): Layer
  280. addTo(viewer: Viewer): Layer
  281. on(type: String | Number, callback: Function, context: any): Layer
  282. off(type: String | Number, callback: Function, context: any): Layer
  283. fire(type: String | Number, params: JSON): Layer
  284. }
  285. export class ClusterLayer extends Layer {
  286. constructor(id: String, options?: JSON)
  287. }
  288. export class CzmlLayer extends Layer {
  289. constructor(id: String, url: String, options?: JSON)
  290. }
  291. export class DynamicLayer extends Layer {
  292. constructor(id: String)
  293. }
  294. export class FeatureGridLayer extends Layer {
  295. constructor(id: String, url: String, options?: JSON)
  296. }
  297. export class GeoJsonLayer extends Layer {
  298. constructor(id: String, url: String, options?: JSON)
  299. }
  300. export class GpxLayer extends Layer {
  301. constructor(id: String, url: String, options?: JSON)
  302. }
  303. export class GroundPrimitiveLayer extends Layer {
  304. constructor(id: String)
  305. }
  306. export class HtmlLayer extends Layer {
  307. constructor(id: String)
  308. }
  309. export class KmlLayer extends Layer {
  310. constructor(id: String, url: String, options?: JSON)
  311. }
  312. export class LabelLayer extends Layer {
  313. constructor(id: String)
  314. }
  315. export class PrimitiveLayer extends Layer {
  316. constructor(id: String)
  317. readonly points: any
  318. readonly labels: any
  319. readonly billboards: any
  320. readonly polylines: any
  321. readonly clouds: any
  322. }
  323. export class TilesetLayer extends Layer {
  324. constructor(id: String, url: String, options?: JSON)
  325. }
  326. export class TopoJsonLayer extends Layer {
  327. constructor(id: String)
  328. }
  329. export class VectorLayer extends Layer {
  330. constructor(id: String)
  331. }
  332. export class HeatLayer extends Layer {
  333. constructor(id: String, options?: JSON)
  334. setPositions(positions: Array<Position>): HeatLayer
  335. addPosition(position: Position): HeatLayer
  336. }
  337. export class S3MLayer extends Layer {
  338. constructor(id: String, url: String, options: JSON)
  339. }
  340. export class ChartLayer extends Layer {
  341. constructor(id: String)
  342. readonly chart: any
  343. setOption(option: any): ChartLayer
  344. }
  345. export class WindLayer extends Layer {
  346. constructor(id: String, options: JSON)
  347. setData(data: any, options: JSON): WindLayer
  348. setOptions(options: JSON): WindLayer
  349. }
  350. export class MapvLayer extends Layer {
  351. constructor(id: String, options: JSON)
  352. setDataSet(dataSet: any): MapvLayer
  353. }
  354. export class Overlay {
  355. constructor();
  356. readonly overlayId: String
  357. readonly type: String
  358. readonly delegate: String
  359. readonly state: String
  360. id: String;
  361. allowDrillPicking: Boolean;
  362. contextMenu: Array<any>;
  363. setLabel(text: String, textStyle: JSON): Overlay
  364. setStyle(style: Object): Overlay
  365. remove(): Overlay
  366. addTo(layer: Layer): Overlay
  367. on(type: String | Number, callback: Function, context: any): Overlay
  368. off(type: String | Number, callback: Function, context: any): Overlay
  369. fire(type: String | Number, params: JSON): Overlay
  370. }
  371. export class CustomBillboard extends Overlay {
  372. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  373. position: String | Array<Number> | JSON | Position
  374. icon: String
  375. size: Array<Number>
  376. setVLine(style: JSON): CustomBillboard
  377. setBottomCircle(radius: Number, style: JSON, rotateAmount?: Number): CustomBillboard
  378. }
  379. export class CustomLabel extends Overlay {
  380. constructor(position: String | Array<Number> | JSON | Position, text: String)
  381. position: String | Array<Number> | JSON | Position
  382. text: String
  383. setVLine(style: JSON): CustomLabel
  384. setBottomCircle(radius: Number, style: JSON, rotateAmount?: Number): CustomLabel
  385. }
  386. export class DynamicBillboard extends Overlay {
  387. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  388. position: String | Array<Number> | JSON | Position
  389. icon: String
  390. size: Array<Number>
  391. maxCacheSize: Number
  392. addPosition(position: Position, interval: Number): DynamicBillboard
  393. }
  394. export class DynamicModel extends Overlay {
  395. constructor(position: String | Array<Number> | JSON | Position, modelUrl: String)
  396. position: String | Array<Number> | JSON | Position
  397. modelUrl: String
  398. maxCacheSize: Number
  399. addPosition(position: Position, interval: Number): DynamicModel
  400. }
  401. export class DivIcon extends Overlay {
  402. constructor(position: String | Array<Number> | JSON | Position, content: String | HTMLElement)
  403. position: String | Array<Number> | JSON | Position
  404. content: String | HTMLElement
  405. static fromEntity(entity: any, content: String | HTMLElement): DivIcon
  406. }
  407. export class Model extends Overlay {
  408. constructor(position: String | Array<Number> | JSON | Position, modelUrl: String)
  409. position: String | Array<Number> | JSON | Position
  410. modelUrl: String
  411. rotateAmount: Number
  412. static fromEntity(entity: any, modelUrl: String): DivIcon
  413. }
  414. export class Tileset extends Overlay {
  415. constructor(url: String, options?: JSON)
  416. readonly readyPromise: Promise<any>
  417. setPosition(position: Position): Tileset
  418. setHeadingPitchRoll(heading: Number, pitch: Number, roll: Number): Tileset
  419. clampToGround(): Tileset
  420. setHeight(height: Number, isAbsolute?: Boolean): Tileset
  421. setScale(sacle: Number): Tileset
  422. setProperties(properties: JSON): Tileset
  423. setCustomShader(fragmentShader: String): Tileset
  424. replaceFS(fragmentShader: String): Tileset
  425. setSplitDirection(splitDirection: Number): Tileset
  426. }
  427. export class AttackArrow extends Overlay {
  428. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  429. positions: String | Array<String | Array<Number> | JSON | Position>
  430. }
  431. export class DoubleArrow extends Overlay {
  432. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  433. positions: String | Array<String | Array<Number> | JSON | Position>
  434. }
  435. export class FineArrow extends Overlay {
  436. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  437. positions: String | Array<String | Array<Number> | JSON | Position>
  438. }
  439. export class GatheringPlace extends Overlay {
  440. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  441. positions: String | Array<String | Array<Number> | JSON | Position>
  442. }
  443. export class TailedAttackArrow extends Overlay {
  444. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  445. positions: String | Array<String | Array<Number> | JSON | Position>
  446. }
  447. export class BillboardPrimitive extends Overlay {
  448. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  449. position: String | Array<Number> | JSON | Position
  450. icon: String
  451. size: Array<Number>
  452. }
  453. export class BounceBillboardPrimitive extends BillboardPrimitive {
  454. }
  455. export class BounceLabelPrimitive extends LabelPrimitive {
  456. }
  457. export class CloudPrimitive extends Overlay {
  458. constructor(position: String | Array<Number> | JSON | Position)
  459. position: String | Array<Number> | JSON | Position
  460. }
  461. export class DiffuseWallPrimitive extends Overlay {
  462. constructor(center: String | Array<Number> | JSON | Position, radius: Number, height: Number)
  463. position: String | Array<Number> | JSON | Position
  464. radius: Number
  465. height: Number
  466. }
  467. export class ElecEllipsoidPrimitive extends Overlay {
  468. constructor(center: String | Array<Number> | JSON | Position, radius: JSON)
  469. position: String | Array<Number> | JSON | Position
  470. radius: JSON
  471. }
  472. export class FlowLinePrimitive extends Overlay {
  473. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, width?: Number)
  474. positions: String | Array<String | Array<Number> | JSON | Position>
  475. }
  476. export class LabelPrimitive extends Overlay {
  477. constructor(position: String | Array<Number> | JSON | Position, text: String)
  478. position: String | Array<Number> | JSON | Position
  479. text: String
  480. }
  481. export class LightCylinderPrimitive extends Overlay {
  482. constructor(center: String | Array<Number> | JSON | Position, length: Number, topRadius: Number, bottomRadius: Number)
  483. center: String | Array<Number> | JSON | Position
  484. length: Number
  485. topRadius: Number
  486. bottomRadius: Number
  487. }
  488. export class ModelCollectionPrimitive extends Overlay {
  489. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, modelUrl: String)
  490. readonly readyPromise: Promise<any>
  491. attrs: Array<any>
  492. positions: String | Array<String | Array<Number> | JSON | Position>
  493. modelUrl: String
  494. getModelInstance(instanceId: String): any
  495. getAttrByInstanceId(instanceId: String): any
  496. }
  497. export class ModelPrimitive extends Overlay {
  498. constructor(position: String | Array<Number> | JSON | Position, modelUrl: String)
  499. readonly readyPromise: Promise<any>
  500. position: String | Array<Number> | JSON | Position
  501. modelUrl: String
  502. getMaterial(name: String): any
  503. getMesh(name: String): any
  504. getNode(name: String): any
  505. getNodes(): Array<any>
  506. }
  507. export class PointPrimitive extends Overlay {
  508. constructor(position: String | Array<Number> | JSON | Position)
  509. position: String | Array<Number> | JSON | Position
  510. }
  511. export class PolylinePrimitive extends Overlay {
  512. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  513. positions: String | Array<String | Array<Number> | JSON | Position>
  514. }
  515. export class ScanCirclePrimitive extends Overlay {
  516. constructor(position: String | Array<Number> | JSON | Position, radius: Number)
  517. position: String | Array<Number> | JSON | Position
  518. radius: Number
  519. }
  520. export class TrailLinePrimitive extends Overlay {
  521. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, width?: Number)
  522. positions: String | Array<String | Array<Number> | JSON | Position>
  523. }
  524. export class VideoPrimitive extends Overlay {
  525. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, video: HTMLVideoElement)
  526. positions: String | Array<String | Array<Number> | JSON | Position>
  527. video: HTMLVideoElement
  528. }
  529. export class WaterPrimitive extends Overlay {
  530. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, holes?: Array<String | Array<Number> | JSON | Position>)
  531. positions: String | Array<String | Array<Number> | JSON | Position>
  532. }
  533. export class Billboard extends Overlay {
  534. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  535. position: String | Array<Number> | JSON | Position
  536. icon: String
  537. size: Array<Number>
  538. }
  539. export class Box extends Overlay {
  540. constructor(position: String | Array<Number> | JSON | Position, length: Number, width: Number, height: Number)
  541. position: String | Array<Number> | JSON | Position
  542. length: Number
  543. width: Number
  544. height: Number
  545. }
  546. export class Circle extends Overlay {
  547. constructor(center: String | Array<Number> | JSON | Position, radius: Number)
  548. position: String | Array<Number> | JSON | Position
  549. radius: Number
  550. }
  551. export class Corridor extends Overlay {
  552. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  553. positions: String | Array<String | Array<Number> | JSON | Position>
  554. }
  555. export class Cylinder extends Overlay {
  556. constructor(position: String | Array<Number> | JSON | Position, length: Number, topRadius: Number, bottomRadius: Number)
  557. position: String | Array<Number> | JSON | Position
  558. length: Number
  559. topRadius: Number
  560. bottomRadius: Number
  561. }
  562. export class Ellipse extends Overlay {
  563. constructor(position: String | Array<Number> | JSON | Position, semiMajorAxis: Number, semiMinorAxis: Number)
  564. position: String | Array<Number> | JSON | Position
  565. semiMajorAxis: Number
  566. semiMinorAxis: Number
  567. }
  568. export class Ellipsoid extends Overlay {
  569. constructor(position: String | Array<Number> | JSON | Position, radius: JSON)
  570. position: String | Array<Number> | JSON | Position
  571. radius: JSON
  572. }
  573. export class Label extends Overlay {
  574. constructor(position: String | Array<Number> | JSON | Position, text: String)
  575. position: String | Array<Number> | JSON | Position
  576. text: String
  577. }
  578. export class Plane extends Overlay {
  579. constructor(position: String | Array<Number> | JSON | Position, width: Number, height: Number, plane: Object)
  580. position: String | Array<Number> | JSON | Position
  581. width: Number
  582. height: Number
  583. distance: Number
  584. }
  585. export class Point extends Overlay {
  586. constructor(position: String | Array<Number> | JSON | Position)
  587. position: String | Array<Number> | JSON | Position
  588. }
  589. export class Polygon extends Overlay {
  590. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  591. positions: String | Array<String | Array<Number> | JSON | Position>
  592. }
  593. export class Polyline extends Overlay {
  594. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  595. positions: String | Array<String | Array<Number> | JSON | Position>
  596. }
  597. export class PolylineVolume extends Overlay {
  598. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, shape?: Array<any>)
  599. positions: String | Array<String | Array<Number> | JSON | Position>
  600. shape: Array<any>
  601. }
  602. export class Rectangle extends Overlay {
  603. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  604. positions: String | Array<String | Array<Number> | JSON | Position>
  605. }
  606. export class Wall extends Overlay {
  607. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  608. positions: String | Array<String | Array<Number> | JSON | Position>
  609. }
  610. export class Animation {
  611. constructor(viewer: Viewer)
  612. readonly type: String
  613. start(): Animation
  614. stop: Animation
  615. }
  616. export class AroundPoint extends Animation {
  617. constructor(viewer: Viewer, position: Position, options: JSON)
  618. }
  619. export class AroundView extends Animation {
  620. constructor(viewer: Viewer, options: JSON)
  621. }
  622. export class CircleScan extends Animation {
  623. constructor(viewer: Viewer, position: Position, radius: Number, options: JSON)
  624. }
  625. export class Flying extends Animation {
  626. constructor(viewer: Viewer, options: JSON)
  627. }
  628. export class GlobeRotate extends Animation {
  629. constructor(viewer: Viewer, options: JSON)
  630. }
  631. export class RadarScan extends Animation {
  632. constructor(viewer: Viewer, position: Position, radius: Number, options: JSON)
  633. }
  634. export class Effect {
  635. readonly blackAndWhite: any
  636. readonly bloom: any
  637. readonly brightness: any
  638. readonly depthOfField: any
  639. readonly lensFlare: any
  640. readonly night: any
  641. readonly silhouette: any
  642. }
  643. export class GroundSkyBox {
  644. constructor(options: JSON)
  645. }
  646. export class TrackController {
  647. constructor(viewer: Viewer)
  648. readonly delegate: any
  649. readonly state: String
  650. addTrack(track: Track): TrackController
  651. getTrack(id: String): Track
  652. removeTrack(track: Track): TrackController
  653. getTracks(): Array<Track>
  654. play(): TrackController
  655. pause(): TrackController
  656. restore(): TrackController
  657. viewTrack(track: Track, viewOption: JSON): TrackController
  658. releaseTrack(track: Track): TrackController
  659. clear(): TrackController
  660. }
  661. export class Track {
  662. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, duration: Number, callback: Function, options?: JSON)
  663. positions: String | Array<String | Array<Number> | JSON | Position>
  664. duration: Number
  665. addPosition(position: Position, duration: Number): Track
  666. setModel(modelPath: String, style: JSON): Track
  667. setBillboard(icon: String, style: JSON): Track
  668. setLabel(text: String, style: JSON): Track
  669. setPath(visible: Boolean, style: JSON): Track
  670. }
  671. export class CircleBlurMaterialProperty {
  672. constructor(options: JSON)
  673. }
  674. export class CircleDiffuseMaterialProperty {
  675. constructor(options: JSON)
  676. }
  677. export class CircleFadeMaterialProperty {
  678. constructor(options: JSON)
  679. }
  680. export class CirclePulseMaterialProperty {
  681. constructor(options: JSON)
  682. }
  683. export class CircleScanMaterialProperty {
  684. constructor(options: JSON)
  685. }
  686. export class CircleSpiralMaterialProperty {
  687. constructor(options: JSON)
  688. }
  689. export class CircleVaryMaterialProperty {
  690. constructor(options: JSON)
  691. }
  692. export class CircleWaveMaterialProperty {
  693. constructor(options: JSON)
  694. }
  695. export class EllipsoidElectricMaterialProperty {
  696. constructor(options: JSON)
  697. }
  698. export class EllipsoidTrailMaterialProperty {
  699. constructor(options: JSON)
  700. }
  701. export class PolylineEmissionMaterialProperty {
  702. constructor(options: JSON)
  703. }
  704. export class PolylineFlickerMaterialProperty {
  705. constructor(options: JSON)
  706. }
  707. export class PolylineFlowMaterialProperty {
  708. constructor(options: JSON)
  709. }
  710. export class PolylineImageTrailMaterialProperty {
  711. constructor(options: JSON)
  712. }
  713. export class PolylineLightingMaterialProperty {
  714. constructor(options: JSON)
  715. }
  716. export class PolylineLightingTrailMaterialProperty {
  717. constructor(options: JSON)
  718. }
  719. export class PolylineTrailMaterialProperty {
  720. constructor(options: JSON)
  721. }
  722. export class RadarLineMaterialProperty {
  723. constructor(options: JSON)
  724. }
  725. export class RadarSweepMaterialProperty {
  726. constructor(options: JSON)
  727. }
  728. export class RadarWaveMaterialProperty {
  729. constructor(options: JSON)
  730. }
  731. export class WallImageTrailMaterialProperty {
  732. constructor(options: JSON)
  733. }
  734. export class WallLineTrailMaterialProperty {
  735. constructor(options: JSON)
  736. }
  737. export class WaterMaterialProperty {
  738. constructor(options: JSON)
  739. }
  740. export class Plot {
  741. constructor(viewer: Viewer, options: JSON)
  742. readonly viewer: Viewer
  743. readonly layer: any
  744. readonly state: String
  745. draw(type: String, callback?: Function, style?: JSON, clampToModel?: Boolean): Plot
  746. edit(overlay: Overlay, callback?: Function, clampToModel?: Boolean): Plot
  747. stop(): Plot
  748. destroy(): Plot
  749. }
  750. export class RoamingController {
  751. constructor(viewer: Viewer)
  752. addPath(path: RoamingPath): RoamingController
  753. addPaths(paths: Array<RoamingPath>): RoamingController
  754. removePath(path: RoamingPath): RoamingController
  755. getPath(id: String): RoamingPath
  756. getPaths(): Array<RoamingPath>
  757. activate(path: RoamingPath, viewOption: JSON): RoamingController
  758. deactivate(): RoamingController
  759. clear(): RoamingController
  760. }
  761. export class RoamingPath {
  762. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, duration: Number, pathMode?: String)
  763. positions: String | Array<String | Array<Number> | JSON | Position>
  764. duration: Number
  765. pathMode?: String
  766. }
  767. export function mixin(DC: any): void
  768. export function use(plugin: any): void
  769. export function init(callback: Function): void
  770. export function ready(callback: Function): void
  771. }