|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425 |
- ---
- sidebar: auto
- ---
-
- # Overlays 🌎
-
- An important part of the 3D scene, digitally representing an entity in the three scenes and recording its real-time state
-
- ## Overlay
-
- > base class
-
- :::warning
- The class cannot be instantiated
- :::
-
- ### properties
-
- - `{String} overlayId` **_`readonly`_**
- - `{String} id`
- - `{Boolean} show`
- - `{Object} attr`
- - `{Array} contextMenu`
- - `{String} state` **_`readonly`_**
- - `{String} type` **_`readonly`_**
- - `{Boolean} allowDrillPicking`:Default is false, if true, the overlay selects all the overlays behind it for penetration and triggers a mouse thing for all the overlays behind it 件
-
- ### methods
-
- - **_addTo(layer)_**
-
- - parameters
- - `{Layer} layer`
- - returns `this`
-
- - **_remove()_**
-
- - returns `this`
-
- - **_setLabel(text, textStyle)_**
-
- - parameters
- - `{String} text`
- - `{String} textStyle` [DC.Label](#dc-label)
- - returns `this`
-
- :::warning
- This function is only valid for the following overlays:Point、Circle、Polygon、Billboard、Ellipse、Rectangle
- :::
-
- - **_on(type, callback, context)_**
-
- Event Subscription
-
- - parameters
- - `{Object} type`
- - `{Function} callback`
- - `{Object} context`
- - returns `this`
-
- - **_off(type, callback, context)_**
-
- Event Unsubscribe
-
- - parameters
- - `{Object} type`
- - `{Function} callback`
- - `{Object} context`
- - returns `this`
-
- - **_fire(type,params)_**
-
- - parameters
- - `{Object} type`
- - `{Object} params`
- - returns `this`
-
- ### static methods
-
- - **_registerType(type)_**
-
- - parameters
- - `{String} type`
-
- - **_getOverlayType(type)_**
-
- - parameters
- - `{String} type`
- - returns `string`
-
- ## DC.Point
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let point = new DC.Point(position)
- point.setStyle({
- pixelSize: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(position)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - returns `point`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [PointGraphics](http://resource.dvgis.cn/cesium-docs/PointGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "pixelSize": 1,
- "heightReference": 0,
- "color": DC.Color.WHITE,
- "outlineColor": DC.Color.WHITE,
- "outlineWidth": 0,
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`
- - returns `point`
-
- ## DC.Polyline
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let polyline = new DC.Polyline('120,20;120,30')
- polyline.setStyle({
- width: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `polyline`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{DC.Position} center` **_`readonly`_**
- - `{Number} distance` **_`readonly`_**
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [PolylineGraphics](http://resource.dvgis.cn/cesium-docs/PolylineGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "width": 1,
- "material": DC.Color.WHITE,
- "clampToGround": false,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`
- - returns `polyline`
-
- ## DC.Polygon
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let polygon = new DC.Polygon('120,20;120,30;122,30')
- polygon.setStyle({
- height: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `polygon`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{String|Array<Position|Number|String|Object>} holes`
- - `{DC.Position} center` **_`readonly`_**
- - `{Number} area` **_`readonly`_**
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [PolygonGraphics](http://resource.dvgis.cn/cesium-docs/PolygonGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "height": 1,
- "heightReference": 0,
- "extrudedHeight": 0,
- "stRotation": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "closeTop": true,
- "closeBottom": true,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`
- - returns `polygon`
-
- ## DC.Billboard
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let billboard = new DC.Billboard(position, '***/**.png')
- billboard.size = [20, 20]
- ```
-
- ### creation
-
- - **_constructor(position,icon)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - returns `billboard`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - `{Array<Number>} size`: [width,height]
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [BillboardGraphics](http://resource.dvgis.cn/cesium-docs/BillboardGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "rotation": 0,
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`:
- - returns `billboard`
-
- ## DC.Label
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let Label = new DC.Label(position, 'test')
- ```
-
- ### creation
-
- - **_constructor(position,text)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} text`
- - returns `label`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} text`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [LabelGraphics](http://resource.dvgis.cn/cesium-docs/LabelGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "font": "30px sans-serif",
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "heightReference": 0,
- "showBackground": false,
- "backgroundColor": DC.Color.BLACK,
- "backgroundPadding": { "x": 0, "y": 0 },
- "fillColor": DC.Color.BLACK,
- "outlineColor": DC.Color.WHITE,
- "outlineWidth": 0,
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- - **_fromEntity(entity,text)_**
-
- - parameters
- - `{Object} entity`
- - `{String} text`
- - returns `label`
-
- ## DC.Circle
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let circle = new DC.Circle(position, 200)
- ```
-
- ### creation
-
- - **_constructor(center, radius)_**
-
- - parameters
- - `{Position|String|Array|Object} center`
- - `{String} radius`
- - returns `billboard`
-
- ### properties
-
- - `{Position|String|Array|Object} center`
- - `{String} radius`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [EllipseGraphics](http://resource.dvgis.cn/cesium-docs/EllipseGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "height": 1,
- "heightReference": 0,
- "extrudedHeight": 0,
- "rotation": 0,
- "stRotation": 0,
- "fill": true, s
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- ## DC.Rectangle
-
- > 矩形要素,继承于[Overlay](#overlay)
-
- ### example
-
- ```js
- let rectangle = new DC.Rectangle('-90.0,32.0;-94.0,36.0;')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- 构造函数
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`:坐标串
- - returns `rectangle`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`:坐标串
-
- ### methods
-
- - **_setStyle(style)_**
-
- 设置样式
-
- - parameters
- - `{Object} style`:样式,详情参考:[RectangleGraphics](http://resource.dvgis.cn/cesium-docs/RectangleGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "height": 1, //高度
- "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
- "extrudedHeight": 0, //拉升高度
- "rotation": 0, //顺时针旋转角度
- "stRotation": 0, //逆时针旋转角度
- "fill": true, //是否用提供的材料填充多边形。
- "material": DC.Color.WHITE, //材质
- "outline": false, //是否显示边框
- "outlineColor": DC.Color.BLACK, //边框颜色
- "outlineWidth": 0, //边框宽度
- "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
- "distanceDisplayCondition": {
- "near": 0, //最近距离
- "far": Number.MAX_VALUE //最远距离
- }, //根据距离设置可见
- "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
- "zIndex": 0 //层级
- }
- ```
-
- ## DC.Wall
-
- > 墙体要素,继承于[Overlay](#overlay)
-
- ### example
-
- ```js
- let wall = new DC.Wall('-90.0,32.0,1000;-94.0,36.0,1000;')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- 构造函数
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`:坐标串
- - returns `wall`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`:坐标串
-
- ### methods
-
- - **_setStyle(style)_**
-
- 设置样式
-
- - parameters
- - `{Object} style`:样式,详情参考:[WallGraphics](http://resource.dvgis.cn/cesium-docs/WallGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "fill": true, //是否用提供的材料填充多边形。
- "material": DC.Color.WHITE, //材质
- "outline": false, //是否显示边框
- "outlineColor": DC.Color.BLACK, //边框颜色
- "outlineWidth": 0, //边框宽度
- "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
- "distanceDisplayCondition": {
- "near": 0, //最近距离
- "far": Number.MAX_VALUE //最远距离
- }, //根据距离设置可见
- "classificationType": 2 //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
- }
- ```
-
- - **_fromEntity(entity)_**
-
- Entity 转换为 Overlay
-
- - parameters
- - `{Object} entity`:Cesium 覆盖物
- - returns `wall`
-
- ## DC.Model
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let model = new DC.Model(position, '**/**.glb')
- ```
-
- ### creation
-
- - **_constructor(position, modelUrl)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} modelUrl`
- - returns `model`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} modelUrl`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [ModelGraphics](http://resource.dvgis.cn/cesium-docs/ModelGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "scale": 1,
- "minimumPixelSize": 0,
- "maximumScale": 0,
- "heightReference": 0,
- "shadows": 0,
- "silhouetteColor": DC.Color.RED,
- "silhouetteSize": 0,
- "lightColor": DC.Color.RED,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- - **_fromEntity(entity,modelUrl)_**
-
- - parameters
- - `{Object} entity`
- - `{String} modelUrl`
- - returns `model`
-
- ## DC.Tileset
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let tileset = new DC.Tileset('**/tileset.json')
- tileset.setPosition(position)
- ```
-
- ### creation
-
- - **_constructor(url,[options])_**
-
- - parameters
- - `{String} url`
- - `{Object} options` [Tileset](http://resource.dvgis.cn/cesium-docs/Cesium3DTileset.html)
- - returns `tileset`
-
- ### properties
-
- -`{Promise} readyPromise`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [TileStyle](https://github.com/CesiumGS/3d-tiles/tree/master/specification/Styling)
- - returns `this`
-
- ```js
- let style = new DC.TilesetStyle({
- color: {
- conditions: [
- ['${Height} >= 100', 'color("purple", 0.5)'],
- ['${Height} >= 50', 'color("red")'],
- ['true', 'color("blue")'],
- ],
- },
- show: '${Height} > 0',
- })
- ```
-
- - **_setPosition(position)_**
-
- - parameters
- - `{Position|Array|String} position`
- - returns `this`
-
- - **_setHeadingPitchRoll(heading, pitch, roll)_**
-
- - parameters
- - `{Number} heading`
- - `{Number} pitch`
- - `{Number} roll`
- - returns `this`
-
- - **_setHeight(height,isAbsolute)_**
-
- - parameters
- - `{Number} height`
- - `{Boolean} isAbsolute`
- - returns `this`
-
- - **_setScale(scale)_**
-
- - parameters
- - `{Number} scale`
- - returns `this`
-
- - **_setCustomShader(customShader)_**
-
- - parameters
- - `{String} customShader`
- - returns `this`
-
- - **_setProperties(properties)_**
-
- - parameters
- - `{Array<Object>} properties`
- - returns `this`
-
- ```json
- {
- "key": "name",
- "keyValue": "1",
- "propertyName": "highlight",
- "propertyValue": true
- }
- ```
-
- ## DC.DivIcon
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let divIcon = new DC.DivIcon(position, '<div></div>')
- ```
-
- ### creation
-
- - **_constructor(position, content)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String|Element} content`
- - returns `divIcon`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String|Element} content` **_`writeonly`_**
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "className": "test",
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- - **_fromEntity(entity,content)_**
-
- - parameters
- - `{Object} entity`
- - `{String|Element} content`
- - returns `divIcon`
-
- ## DC.Box
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let box = new DC.Box(position, 20, 30, 40)
- ```
-
- ### creation
-
- - **_constructor(position, length, width, height)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{Number} length`
- - `{Number} width`
- - `{Number} height`
- - returns `box`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{Number} length`
- - `{Number} width`
- - `{Number} height`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [BoxGraphics](http://resource.dvgis.cn/cesium-docs/BoxGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.Corridor
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let corridor = new DC.Corridor('120,20;120,30')
- corridor.setStyle({
- width: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `corridor`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [CorridorGraphics](http://resource.dvgis.cn/cesium-docs/CorridorGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "width": 1,
- "height": 0,
- "heightReference": 0,
- "cornerType": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`
- - returns `corridor`
-
- ## DC.Cylinder
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let cylinder = new DC.Cylinder(position, 20, 30, 40)
- ```
-
- ### creation
-
- - **_constructor(position, length, topRadius, bottomRadius)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{Number} length`
- - `{Number} topRadius`
- - `{Number} bottomRadius`
- - returns `cylinder`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{Number} length`
- - `{Number} topRadius`
- - `{Number} bottomRadius`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [CylinderGraphics](http://resource.dvgis.cn/cesium-docs/CylinderGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.Ellipse
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let ellipse = new DC.Ellipse(position, 20, 30)
- ```
-
- ### creation
-
- - **_constructor(position, semiMajorAxis, semiMinorAxis)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{Number} semiMajorAxis`
- - `{Number} semiMinorAxis`
- - returns `ellipse`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{Number} semiMajorAxis`
- - `{Number} semiMinorAxis`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [EllipseGraphics](http://resource.dvgis.cn/cesium-docs/EllipseGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "height": 1,
- "heightReference": 0,
- "extrudedHeight": 0,
- "rotation": 0,
- "stRotation": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- ## DC.Ellipsoid
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let ellipsoid = new DC.Ellipsoid(position, { x: 30, y: 30, z: 30 })
- ```
-
- ### creation
-
- - **_constructor(position, radius)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{Object} radius`:{x: 30, y: 30, z: 30}
- - returns `ellipsoid`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{Object} radius`:{x: 30, y: 30, z: 30}
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [EllipsoidGraphics](http://resource.dvgis.cn/cesium-docs/EllipsoidGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.Plane
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let plane = new DC.Plane(position, 20, 30, { normal: 'x' })
- ```
-
- ### creation
-
- - **_constructor(position, width, height, direction)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{Number} width`
- - `{Number} height`
- - `{Object} plane`
- - returns `plane`
-
- ```json
- // plane
- {
- "normal": "x",
- "distance": 0
- }
- ```
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{Number} width`
- - `{Number} height`
- - `{Number} distance`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [PlaneGraphics](http://resource.dvgis.cn/cesium-docs/PlaneGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.PolylineVolume
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- function computeCircle(radius) {
- var positions = []
- for (var i = 0; i < 360; i++) {
- var radians = DC.Math.toRadians(i)
- positions.push({
- x: radius * Math.cos(radians),
- y: radius * Math.sin(radians),
- })
- }
- return positions
- }
-
- let polylineVolume = new DC.PolylineVolume(
- '-90.0,32.0,0.0;-90.0,36.0,100000.0;-94.0,36.0,0.0;',
- computeCircle(60000)
- )
- ```
-
- ### creation
-
- - **_constructor(positions, shape)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Array} shape`
- - returns `polylineVolume`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Array} shape`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [PolylineVolumeGraphics](http://resource.dvgis.cn/cesium-docs/PolylineVolumeGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "cornerType": 0,
- "fill": true,
- "material": DC.Color.WHITE,
- "outline": false,
- "outlineColor": DC.Color.BLACK,
- "outlineWidth": 0,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- - **_fromEntity(entity)_**
-
- - parameters
- - `{Object} entity`
- - returns `polylineVolume`
-
- ## DC.DynamicBillboard
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let billboard = new DC.DynamicBillboard(position, '***/**.png')
- billboard.size = [20, 20]
- ```
-
- ### creation
-
- - **_constructor(position,icon)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - returns `billboard`
-
- ### properties
-
- - `{Position} position` **_`readonly`_**
- - `{String} icon`
- - `{Array<Number>} size`
-
- ### methods
-
- - **_addPosition(position,interval)_**
-
- - parameters
- - `{Position|Array|String|Object} position`
- - `{Number} interval`
- - return's `this`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [BillboardGraphics](http://resource.dvgis.cn/cesium-docs/BillboardGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "rotation": 0,
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.DynamicModel
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let model = new DC.DynamicModel(position, '**/**.glb')
- ```
-
- ### creation
-
- - **_constructor(position, modelUrl)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} modelUrl`
- - returns `model`
-
- ### properties
-
- - `{Position} position` **_`readonly`_**
- - `{String} modelUrl`
-
- ### methods
-
- - **_addPosition(position,interval)_**
-
- - parameters
- - `{Position|Array|String|Object} position`
- - `{Number} interval`
- - returns `this`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [ModelGraphics](http://resource.dvgis.cn/cesium-docs/ModelGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "scale": 1,
- "minimumPixelSize": 0,
- "maximumScale": 0,
- "heightReference": 0,
- "shadows": 0,
- "silhouetteColor": DC.Color.RED,
- "silhouetteSize": 0,
- "lightColor": DC.Color.RED,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.CustomBillboard
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let billboard = new DC.CustomBillboard(position, '***/**.png')
- billboard.size = [20, 20]
- ```
-
- ### creation
-
- - **_constructor(position,icon)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - returns `billboard`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - `{Array<Number>} size`
-
- ### methods
-
- - **_setVLine(style)_**
-
- - parameters
- - `{Object} style` [PolylineGraphics](http://resource.dvgis.cn/cesium-docs/PolylineGraphics.html)
- - returns `this`
-
- - **_setBottomCircle(radius,style,rotateAmount)_**
-
- - parameters
- - `{Number} radius`
- - `{Object} style` [EllipseGraphics](http://resource.dvgis.cn/cesium-docs/EllipseGraphics.html)
- - `{Number} rotateAmount`
- - returns `this`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [BillboardGraphics](http://resource.dvgis.cn/cesium-docs/BillboardGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "rotation": 0,
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.CustomLabel
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let label = new DC.CustomLabel(position, 'test')
- ```
-
- ### creation
-
- - **_constructor(position,text)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} text`
- - returns `label`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} text`
-
- ### methods
-
- - **_setVLine(style)_**
-
- - parameters
- - `{Object} style` [PolylineGraphics](http://resource.dvgis.cn/cesium-docs/PolylineGraphics.html)
- - returns `this`
-
- - **_setBottomCircle(radius,style,rotateAmount)_**
-
- - parameters
- - `{Number} radius`
- - `{Object} style` [EllipseGraphics](http://resource.dvgis.cn/cesium-docs/EllipseGraphics.html)
- - `{Number} rotateAmount`
- - returns `this`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [LabelGraphics](http://resource.dvgis.cn/cesium-docs/LabelGraphics.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "rotation": 0,
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.AttackArrow
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let attackArrow = new DC.AttackArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `attackArrow`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Polygon](#dc-polygon)
- - returns `this`
-
- ## DC.DoubleArrow
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let doubleArrow = new DC.DoubleArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `doubleArrow`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Polygon](#dc-polygon)
- - returns `this`
-
- ## DC.FineArrow
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let fineArrow = new DC.FineArrow('-90.0,32.0;-94.0,36.0')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `fineArrow`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Polygon](#dc-polygon)
- - returns `this`
-
- ## DC.GatheringPlace
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let gatheringPlace = new DC.GatheringPlace('-90.0,32.0;-94.0,36.0')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `gatheringPlace`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Polygon](#dc-polygon)
- - returns `this`
-
- ## DC.TailedAttackArrow
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let tailedAttackArrow = new DC.TailedAttackArrow('-90.0,32.0;-94.0,36.0')
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `tailedAttackArrow`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`:[Polygon](#dc-polygon)
- - returns `this`
-
- ## DC.BillboardPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let billboard = new DC.BillboardPrimitive(position, '***/**.png')
- billboard.size = [20, 20]
- ```
-
- ### creation
-
- - **_constructor(position,icon)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - returns `billboard`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} icon`
- - `{Array<Number>} size`: [width,height]
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Billboard](http://resource.dvgis.cn/cesium-docs/Billboard.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "heightReference": 0,
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "rotation": 0,
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.BounceBillboardPrimitive
-
- > Inherited from [BillboardPrimitive](#dc-billboardprimitive)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let billboard = new DC.BounceBillboardPrimitive(position, '***/**.png')
- billboard.size = [20, 20]
- ```
-
- ### creation
-
- - **_constructor(position,icon)_**
-
- - parameters
- - `{Position|Number|String|Object} position`
- - `{String} icon`
- - returns `billboard`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Billboard](http://resource.dvgis.cn/cesium-docs/Billboard.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "maxOffsetY": 10, //Maximum translation in vertical direction
- "offsetAmount": 0.1 //Vertical panning per frame
- // Other styles refer to BillboardPrimitive style
- }
- ```
-
- ## DC.DiffuseWallPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let wall = new DC.DiffuseWallPrimitive(position, 2000, 1000)
- ```
-
- ### creation
-
- - **_constructor(center, radius, height)_**
-
- - parameters
- - `{Position|Number|String|Object} center`
- - `{Number} radius`
- - `{Number} height`
- - returns `wall`
-
- ### properties
-
- - `{Position|Number|String|Object} center`
- - `{Number} radius`
- - `{Number} height`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "minRadius": 10,
- "minHeight": 30,
- "color": DC.Color.RED,
- "slices": 128,
- "speed": 10
- }
- ```
-
- ## DC.ElecEllipsoidPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let elecEllipsoid = new DC.ElecEllipsoidPrimitive('120,20',{x:2000,y:2000:z:2000})
- ```
-
- ### creation
-
- - **_constructor(center,radius)_**
-
- - parameters
- - `{String|Position|Array|Object} center`
- - `{Object} radius`: {x:100,y:100,z:100}
- - returns `elecEllipsoidPrimitive`
-
- ### properties
-
- - `{String|Position|Array|Object} center`
- - `{Object} radius`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "speed": 5,
- "color": DC.Color.WHITE
- }
- ```
-
- ## DC.FlowLinePrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let flowLinePrimitive = new DC.FlowLinePrimitive('120,20;120,30;122,30')
- ```
-
- ### creation
-
- - **_constructor(positions,[asynchronous])_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `flowLinePrimitive`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "speed": 5,
- "color": DC.Color.WHITE,
- "percent": 0.3,
- "gradient": 0.1
- }
- ```
-
- ## DC.LabelPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let label = new DC.LabelPrimitive(position, 'test')
- ```
-
- ### creation
-
- - **_constructor(position,text)_**
-
- - parameters
- - `{Position|String|Array|Object} position`
- - `{String} text`
- - returns `label`
-
- ### properties
-
- - `{Position|String|Array|Object} position`
- - `{String} text`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Labels](http://resource.dvgis.cn/cesium-docs/Label.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "font": "30px sans-serif",
- "scale": 1,
- "pixelOffset": { "x": 0, "y": 0 },
- "heightReference": 0,
- "showBackground": false,
- "backgroundColor": DC.Color.BLACK,
- "backgroundPadding": { "x": 0, "y": 0 },
- "fillColor": DC.Color.BLACK,
- "outlineColor": DC.Color.WHITE,
- "outlineWidth": 0,
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.LightCylinderPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let cylinder = new DC.LightCylinderPrimitive(position, 1000,1,100)
- ```
-
- ### creation
-
- - **_constructor(center, length, topRadius, bottomRadius)_**
-
- - parameters
- - `{Position|String|Array|Object} center`
- - `{Number} length`
- - `{Number} topRadius`
- - `{Number} bottomRadius`
- - returns `cylinder`
-
- ### properties
-
- - `{Position|String|Array|Object} center`
- - `{Number} length`
- - `{Number} topRadius`
- - `{Number} bottomRadius`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "color": DC.Color.BLACK
- }
- ```
-
- ## DC.BounceLabelPrimitive
-
- > Inherited from [LabelPrimitive](#dc-labelprimitive)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let label = new DC.BounceLabelPrimitive(position, 'test')
- ```
-
- ### creation
-
- - **_constructor(position,text)_**
-
- - parameters
- - `{Position|Number|String|Object} position`
- - `{String} text`
- - returns `label`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Label](http://resource.dvgis.cn/cesium-docs/Label.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "maxOffsetY": 10, //Maximum translation in vertical direction
- "offsetAmount": 0.1 //Vertical panning per frame
- // Other styles refer to LabelPrimitive style
- }
- ```
-
- ## DC.ModelPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let model = new DC.ModelPrimitive(position, '**/**.glb')
- ```
-
- ### creation
-
- - **_constructor(position, modelUrl)_**
-
- - parameters
- - `{Position|Number|String|Object} position`
- - `{String} modelUrl`
- - returns `model`
-
- ### properties
-
- - `{Position|Number|String|Object} position`
- - `{String} modelUrl`
- - `{Promise} readyPromise` **_`readonly`_**
-
- ### methods
-
- - **_getMaterial(name)_**
-
- - parameters
- - `{String} name`
- - returns `modelMaterial`
-
- - **_getMesh(name)_**
-
- - parameters
- - `{String} name`
- - returns `modelMesh`
-
- - **_getNode(name)_**
-
- - parameters
- - `{String} name`
- - returns `modelNode`
-
- - **_getNodes()_**
-
- - returns `array<ModelNode>`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Model](http://resource.dvgis.cn/cesium-docs/Model.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "scale": 1,
- "minimumPixelSize": 0,
- "maximumScale": 0,
- "heightReference": 0,
- "shadows": 0,
- "silhouetteColor": DC.Color.RED,
- "silhouetteSize": 0,
- "lightColor": DC.Color.RED,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.ModelCollectionPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let positions = '120,20;120,30;122,30'
- let model = new DC.ModelCollectionPrimitive(positions, '**/**.glb')
- ```
-
- ### creation
-
- - **_constructor(positions, modelUrl)_**
-
- - parameters
- - `{Array<Position|String|Object>} positions`
- - `{String} modelUrl`
- - returns `model`
-
- ### properties
-
- - `{Array<Position|String|Object>} positions`
- - `{String} modelUrl`
- - `{Array<Object>} attrs`
- - `{Promise} readyPromise` **_`readonly`_**
-
- ### methods
-
- - **_getModelInstance(instanceId)_**
-
- - parameters
- - `{String} instanceId`:Instance ID, the default is the index of the instance, which can be obtained through mouse events
- - returns `modelInstance`
-
- - **_getAttrByInstanceId(instanceId)_**
-
- - parameters
- - `{String} instanceId`:Instance ID, the default is the index of the instance, which can be obtained through mouse events
- - returns `Object`
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Model](http://resource.dvgis.cn/cesium-docs/Model.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "scale": 1,
- "minimumPixelSize": 0,
- "maximumScale": 0,
- "heightReference": 0,
- "shadows": 0,
- "silhouetteColor": DC.Color.RED,
- "silhouetteSize": 0,
- "lightColor": DC.Color.RED,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- }
- }
- ```
-
- ## DC.PointPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let position = new DC.Position(120, 20)
- let point = new DC.PointPrimitive(position)
- point.setStyle({
- pixelSize: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(position)_**
-
- - parameters
- - `{Position|Number|String|Object} position`:坐标
- - returns `point`
-
- ### properties
-
- - `{Position|Number|String|Object} position`:坐标
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Point](http://resource.dvgis.cn/cesium-docs/Point.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "pixelSize": 1,
- "heightReference": 0,
- "color": DC.Color.WHITE,
- "outlineColor": DC.Color.WHITE,
- "outlineWidth": 0,
- "scaleByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "translucencyByDistance": {
- "near": 0,
- "nearValue": 0,
- "far": 1,
- "farValue": 0
- },
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "disableDepthTestDistance": 0
- }
- ```
-
- ## DC.PolylinePrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let polyline = new DC.PolylinePrimitive('120,20;120,30')
- polyline.setStyle({
- width: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(positions)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `polyline`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Position} center` **_`readonly`_**
- - `{Number} distance` **_`readonly`_**
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style` [Polyline](http://resource.dvgis.cn/cesium-docs/Polyline.html)
- - returns `this`
-
- ```json
- // style(optional)
- {
- "width": 1,
- "material": DC.Color.WHITE,
- "clampToGround": false,
- "shadows": 0,
- "distanceDisplayCondition": {
- "near": 0,
- "far": Number.MAX_VALUE
- },
- "classificationType": 2,
- "zIndex": 0
- }
- ```
-
- ## DC.ScanCirclePrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let scanCirclePrimitive = new DC.ScanCirclePrimitive('120,20', 1000)
- ```
-
- ### creation
-
- - **_constructor(position,radius)_**
-
- - parameters
- - `{String|Position|Array|Object} position`
- - `{Number} radius`
- - returns `scanCirclePrimitive`
-
- ### properties
-
- - `{String|Position|Array|Object} position`
- - `{Number} radius`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "speed": 5,
- "color": DC.Color.WHITE
- }
- ```
-
- ## DC.TrailLinePrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let trailLinePrimitive = new DC.TrailLinePrimitive('120,20;120,30;122,30')
- ```
-
- ### creation
-
- - **_constructor(positions,[asynchronous])_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - returns `trailLinePrimitive`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "speed": 5,
- "color": DC.Color.WHITE
- }
- ```
-
- ## DC.WaterPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let water = new DC.WaterPrimitive('120,20;120,30;122,30')
- water.setStyle({
- baseWaterColor: DC.Color.AQUA.withAlpha(0.3),
- normalMap: 'examples/images/icon/waterNormalsSmall.jpg',
- frequency: 1000.0,
- animationSpeed: 0.01,
- amplitude: 10,
- specularIntensity: 10,
- })
- ```
-
- ### creation
-
- - **_constructor(positions,[holes])_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Array<Position|Number|String|Object>} holes`
- - returns `water`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
-
- ### methods
-
- - **_setStyle(style)_**
-
- - parameters
- - `{Object} style`
- - returns `this`
-
- ```json
- // style(optional)
- {
- "height": 1,
- "extrudedHeight": 0,
- "stRotation": 0,
- "outline": false,
- "closeTop": true,
- "closeBottom": true,
- "classificationType": 2,
- "baseWaterColor": DC.Color.WHITE,
- "blendColor": DC.Color.WHITE,
- "specularMap": "",
- "normalMap": "",
- "frequency": 1000,
- "animationSpeed": 0.03,
- "amplitude": 10,
- "specularIntensity": 10
- }
- ```
-
- ## DC.VideoPrimitive
-
- > Inherited from [Overlay](#overlay)
-
- ### example
-
- ```js
- let videoEl = new document.getElementById('video')
- let videoPrimitive = new DC.VideoPrimitive('120,20;120,30;122,30', videoEl)
- ```
-
- ### creation
-
- - **_constructor(positions,video)_**
-
- - parameters
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Element} video`
- - returns `videoPrimitive`
-
- ### properties
-
- - `{String|Array<Position|Number|String|Object>} positions`
- - `{Element} video`
|