您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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