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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  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)
  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(CustomShader: Object): Tileset
  435. setSplitDirection(splitDirection: Number): Tileset
  436. }
  437. export class AttackArrow extends Overlay {
  438. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  439. positions: String | Array<String | Array<Number> | JSON | Position>
  440. }
  441. export class DoubleArrow extends Overlay {
  442. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  443. positions: String | Array<String | Array<Number> | JSON | Position>
  444. }
  445. export class FineArrow extends Overlay {
  446. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  447. positions: String | Array<String | Array<Number> | JSON | Position>
  448. }
  449. export class GatheringPlace extends Overlay {
  450. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  451. positions: String | Array<String | Array<Number> | JSON | Position>
  452. }
  453. export class TailedAttackArrow extends Overlay {
  454. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  455. positions: String | Array<String | Array<Number> | JSON | Position>
  456. }
  457. export class BillboardPrimitive extends Overlay {
  458. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  459. position: String | Array<Number> | JSON | Position
  460. icon: String
  461. size: Array<Number>
  462. }
  463. export class BounceBillboardPrimitive extends BillboardPrimitive {
  464. }
  465. export class BounceLabelPrimitive extends LabelPrimitive {
  466. }
  467. export class CloudPrimitive extends Overlay {
  468. constructor(position: String | Array<Number> | JSON | Position)
  469. position: String | Array<Number> | JSON | Position
  470. }
  471. export class DiffuseWallPrimitive extends Overlay {
  472. constructor(center: String | Array<Number> | JSON | Position, radius: Number, height: Number)
  473. position: String | Array<Number> | JSON | Position
  474. radius: Number
  475. height: Number
  476. }
  477. export class ElecEllipsoidPrimitive extends Overlay {
  478. constructor(center: String | Array<Number> | JSON | Position, radius: JSON)
  479. position: String | Array<Number> | JSON | Position
  480. radius: JSON
  481. }
  482. export class FlowLinePrimitive extends Overlay {
  483. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, width?: Number)
  484. positions: String | Array<String | Array<Number> | JSON | Position>
  485. }
  486. export class LabelPrimitive extends Overlay {
  487. constructor(position: String | Array<Number> | JSON | Position, text: String)
  488. position: String | Array<Number> | JSON | Position
  489. text: String
  490. }
  491. export class LightCylinderPrimitive extends Overlay {
  492. constructor(center: String | Array<Number> | JSON | Position, length: Number, topRadius: Number, bottomRadius: Number)
  493. center: String | Array<Number> | JSON | Position
  494. length: Number
  495. topRadius: Number
  496. bottomRadius: Number
  497. }
  498. export class ModelCollectionPrimitive extends Overlay {
  499. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, modelUrl: String)
  500. readonly readyPromise: Promise<any>
  501. attrs: Array<any>
  502. positions: String | Array<String | Array<Number> | JSON | Position>
  503. modelUrl: String
  504. getModelInstance(instanceId: String): any
  505. getAttrByInstanceId(instanceId: String): any
  506. }
  507. export class ModelPrimitive extends Overlay {
  508. constructor(position: String | Array<Number> | JSON | Position, modelUrl: String)
  509. readonly readyPromise: Promise<any>
  510. position: String | Array<Number> | JSON | Position
  511. modelUrl: String
  512. getMaterial(name: String): any
  513. getMesh(name: String): any
  514. getNode(name: String): any
  515. getNodes(): Array<any>
  516. }
  517. export class PointPrimitive extends Overlay {
  518. constructor(position: String | Array<Number> | JSON | Position)
  519. position: String | Array<Number> | JSON | Position
  520. }
  521. export class PolylinePrimitive extends Overlay {
  522. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  523. positions: String | Array<String | Array<Number> | JSON | Position>
  524. }
  525. export class ScanCirclePrimitive extends Overlay {
  526. constructor(position: String | Array<Number> | JSON | Position, radius: Number)
  527. position: String | Array<Number> | JSON | Position
  528. radius: Number
  529. }
  530. export class TrailLinePrimitive extends Overlay {
  531. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, width?: Number)
  532. positions: String | Array<String | Array<Number> | JSON | Position>
  533. }
  534. export class VideoPrimitive extends Overlay {
  535. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, video: HTMLVideoElement)
  536. positions: String | Array<String | Array<Number> | JSON | Position>
  537. video: HTMLVideoElement
  538. }
  539. export class WaterPrimitive extends Overlay {
  540. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, holes?: Array<String | Array<Number> | JSON | Position>)
  541. positions: String | Array<String | Array<Number> | JSON | Position>
  542. }
  543. export class Billboard extends Overlay {
  544. constructor(position: String | Array<Number> | JSON | Position, icon: String)
  545. position: String | Array<Number> | JSON | Position
  546. icon: String
  547. size: Array<Number>
  548. }
  549. export class Box extends Overlay {
  550. constructor(position: String | Array<Number> | JSON | Position, length: Number, width: Number, height: Number)
  551. position: String | Array<Number> | JSON | Position
  552. length: Number
  553. width: Number
  554. height: Number
  555. }
  556. export class Circle extends Overlay {
  557. constructor(center: String | Array<Number> | JSON | Position, radius: Number)
  558. position: String | Array<Number> | JSON | Position
  559. radius: Number
  560. }
  561. export class Corridor extends Overlay {
  562. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  563. positions: String | Array<String | Array<Number> | JSON | Position>
  564. }
  565. export class Cylinder extends Overlay {
  566. constructor(position: String | Array<Number> | JSON | Position, length: Number, topRadius: Number, bottomRadius: Number)
  567. position: String | Array<Number> | JSON | Position
  568. length: Number
  569. topRadius: Number
  570. bottomRadius: Number
  571. }
  572. export class Ellipse extends Overlay {
  573. constructor(position: String | Array<Number> | JSON | Position, semiMajorAxis: Number, semiMinorAxis: Number)
  574. position: String | Array<Number> | JSON | Position
  575. semiMajorAxis: Number
  576. semiMinorAxis: Number
  577. }
  578. export class Ellipsoid extends Overlay {
  579. constructor(position: String | Array<Number> | JSON | Position, radius: JSON)
  580. position: String | Array<Number> | JSON | Position
  581. radius: JSON
  582. }
  583. export class Label extends Overlay {
  584. constructor(position: String | Array<Number> | JSON | Position, text: String)
  585. position: String | Array<Number> | JSON | Position
  586. text: String
  587. }
  588. export class Plane extends Overlay {
  589. constructor(position: String | Array<Number> | JSON | Position, width: Number, height: Number, plane: Object)
  590. position: String | Array<Number> | JSON | Position
  591. width: Number
  592. height: Number
  593. distance: Number
  594. }
  595. export class Point extends Overlay {
  596. constructor(position: String | Array<Number> | JSON | Position)
  597. position: String | Array<Number> | JSON | Position
  598. }
  599. export class Polygon extends Overlay {
  600. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  601. positions: String | Array<String | Array<Number> | JSON | Position>
  602. }
  603. export class Polyline extends Overlay {
  604. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  605. positions: String | Array<String | Array<Number> | JSON | Position>
  606. }
  607. export class PolylineVolume extends Overlay {
  608. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, shape?: Array<any>)
  609. positions: String | Array<String | Array<Number> | JSON | Position>
  610. shape: Array<any>
  611. }
  612. export class Rectangle extends Overlay {
  613. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  614. positions: String | Array<String | Array<Number> | JSON | Position>
  615. }
  616. export class Wall extends Overlay {
  617. constructor(positions: String | Array<String | Array<Number> | JSON | Position>)
  618. positions: String | Array<String | Array<Number> | JSON | Position>
  619. }
  620. export class Animation {
  621. constructor(viewer: Viewer)
  622. readonly type: String
  623. start(): Animation
  624. stop: Animation
  625. }
  626. export class AroundPoint extends Animation {
  627. constructor(viewer: Viewer, position: Position, options: JSON)
  628. }
  629. export class AroundView extends Animation {
  630. constructor(viewer: Viewer, options: JSON)
  631. }
  632. export class CircleScan extends Animation {
  633. constructor(viewer: Viewer, position: Position, radius: Number, options: JSON)
  634. }
  635. export class Flying extends Animation {
  636. constructor(viewer: Viewer, options: JSON)
  637. }
  638. export class GlobeRotate extends Animation {
  639. constructor(viewer: Viewer, options: JSON)
  640. }
  641. export class RadarScan extends Animation {
  642. constructor(viewer: Viewer, position: Position, radius: Number, options: JSON)
  643. }
  644. export class Effect {
  645. readonly blackAndWhite: any
  646. readonly bloom: any
  647. readonly brightness: any
  648. readonly depthOfField: any
  649. readonly lensFlare: any
  650. readonly night: any
  651. readonly silhouette: any
  652. }
  653. export class GroundSkyBox {
  654. constructor(options: JSON)
  655. }
  656. export class TrackController {
  657. constructor(viewer: Viewer)
  658. readonly delegate: any
  659. readonly state: String
  660. addTrack(track: Track): TrackController
  661. getTrack(id: String): Track
  662. removeTrack(track: Track): TrackController
  663. getTracks(): Array<Track>
  664. play(): TrackController
  665. pause(): TrackController
  666. restore(): TrackController
  667. viewTrack(track: Track, viewOption: JSON): TrackController
  668. releaseTrack(track: Track): TrackController
  669. clear(): TrackController
  670. }
  671. export class Track {
  672. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, duration: Number, callback: Function, options?: JSON)
  673. positions: String | Array<String | Array<Number> | JSON | Position>
  674. duration: Number
  675. addPosition(position: Position, duration: Number): Track
  676. setModel(modelPath: String, style: JSON): Track
  677. setBillboard(icon: String, style: JSON): Track
  678. setLabel(text: String, style: JSON): Track
  679. setPath(visible: Boolean, style: JSON): Track
  680. }
  681. export class CircleBlurMaterialProperty {
  682. constructor(options: JSON)
  683. }
  684. export class CircleDiffuseMaterialProperty {
  685. constructor(options: JSON)
  686. }
  687. export class CircleFadeMaterialProperty {
  688. constructor(options: JSON)
  689. }
  690. export class CirclePulseMaterialProperty {
  691. constructor(options: JSON)
  692. }
  693. export class CircleScanMaterialProperty {
  694. constructor(options: JSON)
  695. }
  696. export class CircleSpiralMaterialProperty {
  697. constructor(options: JSON)
  698. }
  699. export class CircleVaryMaterialProperty {
  700. constructor(options: JSON)
  701. }
  702. export class CircleWaveMaterialProperty {
  703. constructor(options: JSON)
  704. }
  705. export class EllipsoidElectricMaterialProperty {
  706. constructor(options: JSON)
  707. }
  708. export class EllipsoidTrailMaterialProperty {
  709. constructor(options: JSON)
  710. }
  711. export class PolylineEmissionMaterialProperty {
  712. constructor(options: JSON)
  713. }
  714. export class PolylineFlickerMaterialProperty {
  715. constructor(options: JSON)
  716. }
  717. export class PolylineFlowMaterialProperty {
  718. constructor(options: JSON)
  719. }
  720. export class PolylineImageTrailMaterialProperty {
  721. constructor(options: JSON)
  722. }
  723. export class PolylineLightingMaterialProperty {
  724. constructor(options: JSON)
  725. }
  726. export class PolylineLightingTrailMaterialProperty {
  727. constructor(options: JSON)
  728. }
  729. export class PolylineTrailMaterialProperty {
  730. constructor(options: JSON)
  731. }
  732. export class RadarLineMaterialProperty {
  733. constructor(options: JSON)
  734. }
  735. export class RadarSweepMaterialProperty {
  736. constructor(options: JSON)
  737. }
  738. export class RadarWaveMaterialProperty {
  739. constructor(options: JSON)
  740. }
  741. export class WallImageTrailMaterialProperty {
  742. constructor(options: JSON)
  743. }
  744. export class WallLineTrailMaterialProperty {
  745. constructor(options: JSON)
  746. }
  747. export class WaterMaterialProperty {
  748. constructor(options: JSON)
  749. }
  750. export class Plot {
  751. constructor(viewer: Viewer, options: JSON)
  752. readonly viewer: Viewer
  753. readonly layer: any
  754. readonly state: String
  755. draw(type: String, callback?: Function, style?: JSON, clampToModel?: Boolean): Plot
  756. edit(overlay: Overlay, callback?: Function, clampToModel?: Boolean): Plot
  757. stop(): Plot
  758. destroy(): Plot
  759. }
  760. export class RoamingController {
  761. constructor(viewer: Viewer)
  762. addPath(path: RoamingPath): RoamingController
  763. addPaths(paths: Array<RoamingPath>): RoamingController
  764. removePath(path: RoamingPath): RoamingController
  765. getPath(id: String): RoamingPath
  766. getPaths(): Array<RoamingPath>
  767. activate(path: RoamingPath, viewOption: JSON): RoamingController
  768. deactivate(): RoamingController
  769. clear(): RoamingController
  770. }
  771. export class RoamingPath {
  772. constructor(positions: String | Array<String | Array<Number> | JSON | Position>, duration: Number, pathMode?: String)
  773. positions: String | Array<String | Array<Number> | JSON | Position>
  774. duration: Number
  775. pathMode?: String
  776. }
  777. export function mixin(DC: any): void
  778. export function use(plugin: any): void
  779. export function init(callback: Function): void
  780. export function ready(callback: Function): void
  781. }