Global

Members

getViewModel

获取/设置模型编辑器

hasTextObject

Gets a value indicating whether this button has text associated with it.

(constant) InitializeOptionsTypeString

使用initializeOption接口获取的option对应的实例化对象类型

Properties:
Name Type Default Description
MapGISM3DSet String 0

MapGISM3DSet:M3D对象

MapGISTerrainProvider String 1

MapGISTerrainProvider:MapGIS地形对象

MapGISDynamicLabelCollection String 2

注记图层对象:该功能待重构,枚举标签暂时使用label替代

MapGISMapServerImageryProvider String 3

MapGISMapServerImageryProvider:覆盖物图层IGS 2.0 SceneServer

UrlTemplateImageryProvider String 4

UrlTemplateImageryProvider:覆盖物图层IGS 1.0 g3d

materialsObject

Maps sub-material names to RiverMaterial objects.

Default Value:
undefined

reduceArray

Version:
  • 1.7.1
License:
  • when.js - https://github.com/cujojs/when MIT License (c) copyright B Cavalier & J Hann A lightweight CommonJS Promises/A and when() implementation when is part of the cujo.js family of libraries (http://cujojs.com/) Licensed under the MIT License at: http://www.opensource.org/licenses/mit-license.php

shaderSourceString

The glsl shader source for this material.

Default Value:
undefined

startTime

用于设置漫游开始时间,解决漫游时因时间引起的光照问题

terrainProvider

地形,用于地形填挖方分析时计算采样点高程

translucentBoolean function

When true or a function that returns true, the geometry is expected to appear translucent.

Default Value:
undefined

typeString

The material type. Can be an existing type or a new type. If no type is specified in fabric, type is a GUID.

Default Value:
undefined

uniformsObject

Maps uniform names to their values.

Default Value:
undefined

Methods

_getCurrentRepeatDetail(){*}

engineExtensions/scene/support/dynamicLabel/DynamicLabel.js, line 35
Returns:
Type Description
*

_renderLabelInDecentralize(polyline3D, collection, startRate, endRate, textArr, id, options){*}

engineExtensions/scene/support/dynamicLabel/DynamicLabel.js, line 67
Name Type Description
polyline3D *

线几何计算类

collection *

注记容器

startRate *

开始分段

endRate *

结束分段

textArr *

文字分段数组

id *

注记id

options *

注记选项

Returns:
Type Description
*

addBillboardPrimitive(graphic, position, billboardOptions, success)

document/support/graphic/support/Utils.js, line 700

添加BillboardPrimitive对象,如果设置除绝对高度以外的高程模式,则进行高程采样

Name Type Description
graphic SimpleMarkerGraphic | PictureMarkerGraphic

要采样的绘制对象

position Cesium.Cartographic

要采样的点坐标数组

billboardOptions Object

BillBoard的构造参数

success function

几何添加完毕回调

addMapRefLayer(mapRefOption, sublayerView){Object}

view/utils/support/utils.js, line 605

添加覆盖物图层

Name Type Description
mapRefOption Object

覆盖物图层构造参数

sublayerView IGSSceneSubLayerView

Cesium的view对象

Returns:
Type Description
Object 覆盖物图层innerLayer对象

addPointPrimitive(graphic, position, success)

document/support/graphic/support/Utils.js, line 587

添加PointPrimitive对象,如果设置除绝对高度以外的高程模式,则进行高程采样

Name Type Description
graphic SimpleMarkerGraphic | PictureMarkerGraphic

要采样的绘制对象

position Cesium.Cartographic

要采样的点坐标数组

success function

几何添加完毕回调

addrewriteQueryParameters()

engineExtensions/core/Resource.js, line 178

新增一个rewriteQueryParameters方法,对queryParameters属性重新赋值

any(promisesOrValues, onFulfilled, onRejected, onProgress){Promise}

engineExtensions/util/when.js, line 503

Initiates a competitive race, returning a promise that will resolve when any one of the supplied promisesOrValues has resolved or will reject when all promisesOrValues have rejected.

Name Type Description
promisesOrValues Array | Promise

array of anything, may contain a mix of Promises and values

onFulfilled function 可选 nullable

resolution handler

onRejected function 可选 nullable

rejection handler

onProgress function 可选 nullable

progress handler

Returns:
Type Description
Promise promise that will resolve to the value that resolved first, or will reject with an array of all rejected inputs.

calcNearFarScalarByDistance(distance, nearFarScalar){Number}

engineExtensions/scene/MapGISDivGraphicCollection.js, line 13

根据距离计算插值

Name Type Description
distance Number
nearFarScalar Cesium.NearFarScalar
Returns:
Type Description
Number

chain(promiseOrValue, resolver, resolveValue){Promise}

engineExtensions/util/when.js, line 642

Ensure that resolution of promiseOrValue will trigger resolver with the value or reason of promiseOrValue, or instead with resolveValue if it is provided.

Name Type Description
promiseOrValue
resolver Object
Name Type Description
resolve function
reject function
resolveValue * 可选
Returns:
Type Description
Promise

convertCommonRendererToM3DRenderer(renderer){Object}

view/utils/support/utils.js, line 258

将common层的renderer转为MapGISM3DSet需要的renderer

Name Type Description
renderer Object

common层的renderer的对象

Returns:
Type Description
Object MapGISM3DSet需要的renderer

convertMapGISTextToLabelClass(){*}

view/utils/support/utils.js, line 660

转换文字

Returns:
Type Description
*

convertPictureMarkerSymbolToGraphicStyle(type, paintStyle, symbol){*}

util/featureUtil/ConvertSymbolToGraphicStyle.js, line 111

转换点符号为Cesium Graphics样式

Name Type Description
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

Returns:
Type Description
*

convertShadeToGLSL100(input, isFragmentShader){String}

engineExtensions/util/ShaderUtil.js, line 23

将GLSL 300转换为GLSL 100,该方法目前仅对一些常见的用例进行转换

Name Type Description
input String

GLSL 300版本的Shader代码

isFragmentShader Boolean

是否是片元着色器的Shader代码

Returns:
Type Description
String 转换后的Shader代码

convertSimpleFillSymbolToGraphicStyle(type, paintStyle, symbol){*}

util/featureUtil/ConvertSymbolToGraphicStyle.js, line 31

转换填充符号为Cesium Graphics样式

Name Type Description
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

Returns:
Type Description
*

convertSimpleLineSymbolToGraphicStyle(type, paintStyle, symbol){*}

util/featureUtil/ConvertSymbolToGraphicStyle.js, line 11

转换简单线符号为Cesium Graphics样式

Name Type Description
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

Returns:
Type Description
*

convertSimpleMarkerSymbolToGraphicStyle(type, paintStyle, symbol){*}

util/featureUtil/ConvertSymbolToGraphicStyle.js, line 66

转换点符号为Cesium Graphics样式

Name Type Description
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

Returns:
Type Description
*

createBaseLineMaterial(color, type){Object}

document/support/graphic/support/Utils.js, line 319

通过颜色和线(虚线)类型创建材质,是一个基本的颜色填充线

Name Type Description
color Object

Cesium的颜色对象

type String

线类型

Returns:
Type Description
Object 创建好的cesium的线材质对象

createBillboard(symbolLayer, position, options){Object}

document/support/graphic/support/Symbol3DLayerUtils.js, line 74

通过点坐标构造一个billboard的初始化参数

Name Type Description
symbolLayer IconSymbol3DLayer

三维图标图层

position Array.<Number>

经纬度坐标,[longitude,latitude,height]

options Object

额外参数

Name Type Default Description
image Object 可选

billboard的图片url

show Boolean true 可选

是否显示

layerOpacity Number 1 可选

图层透明度

graphic BaseGraphic 可选

三维的几何对象

Returns:
Type Description
Object billboard构造参数

createGraphic(object){zondy.cesium.Graphic}

util/featureUtil/ConvertFeatureToGraphicUtil.js, line 20

创建cesium 几何对象

Name Type Description
object Object

几何体options

Returns:
Type Description
zondy.cesium.Graphic

createObject3DAppearance(symbolLayer, options){Object}

document/support/graphic/support/Symbol3DLayerUtils.js, line 249

通过ObjectSymbol3DLayer来构造外观对象

Name Type Description
symbolLayer ObjectSymbol3DLayer

三维对象图层

options Object

额外参数

Name Type Default Description
layerOpacity Number 1 可选

额外参数

Returns:
Type Description
Object 三维的外观对象

createSegmentsGeometry()

engineExtensions/simulation/fluid/FlowParticle.js, line 343

创建粒子段的几何形状

defer(){Deferred}

engineExtensions/util/when.js, line 240

Creates a new, Deferred with fully isolated resolver and promise parts, either or both of which may be given out safely to consumers. The Deferred itself has the full API: resolve, reject, progress, and then. The resolver has resolve, reject, and progress. The promise only has then.

Returns:
Type Description
Deferred

demodernizeShader(gl, input, isFragmentShader){String}

engineExtensions/util/ShaderUtil.js, line 58

将GLSL 300转换为GLSL 100,该方法目前仅对一些常见的用例进行转换

Name Type Description
gl WebGLRenderingContext

WebGLRenderingContext对象

input String

GLSL 300版本的Shader代码

isFragmentShader Boolean

是否是片元着色器的Shader代码

Returns:
Type Description
String 转换后的Shader代码

getBillboardAnchor(anchor){Object}

document/support/graphic/support/Symbol3DLayerUtils.js, line 15

根据三维Billboard符号的锚点生成Cesium的锚点

Name Type Description
anchor AnchorType

三维Billboard符号的锚点

Returns:
Type Description
Object Cesium的锚点

getBillboardAndLabelSample(graphic, position){Object}

document/support/graphic/support/Utils.js, line 468

获取BillboardAndLabel的高程模式和更新高程后的点坐标

Name Type Description
graphic BaseGraphic

三维几何对象

position Array.<Number>

经纬度坐标,[longitude,latitude,height]

Returns:
Type Description
Object 高程模式和更新高程后的点坐标

getBillboardOptionsFromPictureMarkerSymbol(symbol){Object}

document/support/graphic/support/EntityUtils.js, line 54

通过符号来构造一个entity的billboard构造参数

Name Type Description
symbol Symbol

符号对象

Returns:
Type Description
Object entity的点构造参数

getBillboardOptionsFromSimpleMarkerSymbol(symbol){Object}

document/support/graphic/support/EntityUtils.js, line 40

通过符号来构造一个entity的billboard构造参数

Name Type Description
symbol Symbol

符号对象

Returns:
Type Description
Object entity的点构造参数

getClassificationTyp(elevationMode){Number}

document/support/graphic/support/Utils.js, line 297

通过ElevationMode的值来获取Cesium的ClassificationTyp值

Name Type Description
elevationMode ElevationMode

高度模式

Returns:
Type Description
Number Cesium的ClassificationTyp值

getDefalutSymbolColor(currenDefaultColor, opacity){String}

view/utils/support/utils.js, line 1066

对于普通普通模型缓存数据,Cesium中的默认效果是原纹理渲染,且使用白色作为此时的默认色,为了使得defaultSymbol能正确渲染得到预期效果,需要将内置的默认色和白色做特殊处理:

  1. 默认色为白色时,稍微处理到容差外,使得看起来和白色一致
  2. 默认色为内置时,转为白色,使得Cesium使用原有颜色渲染
  3. 其他默认色,直接透传
Name Type Description
currenDefaultColor *
opacity *
Returns:
Type Description
String 颜色字符串

getExcludePrimitivesInModelSample(viewer){Array.<Cesium.Primitive>}

document/support/graphic/support/Utils.js, line 163

获取在模型采样中,要排除的point和billboard类型的primitive

Name Type Description
viewer Cesium.Viewer

场景视图对象

Returns:
Type Description
Array.<Cesium.Primitive> 要排除的primitives

getFeatureBySymbolLayer(symbolLayer, type, position, graphic){Feature}

document/support/graphic/support/Utils.js, line 799

根据三维符号图层来创建一个要素对象

Name Type Description
symbolLayer Symbol3DLayer

三维符号图层对象

type SymbolType

符号类型

position Cesium.Cartographic

点坐标

graphic BaseGraphic

三维几何对象

Returns:
Type Description
Feature 要素对象

getLayerByUrl(url, LayerConstructor, layerOptions){Layer}

engineExtensions/scene/imageryProvider/support/Utils.js, line 94

通过url构造Common的图层对象

Name Type Description
url String | Resource

服务基地址

LayerConstructor Layer

图层构造函数

layerOptions Object

图层构造参数

Returns:
Type Description
Layer 构造好的图层对象

getLayerToUse(layers, level, x, y){Object}

engineExtensions/util/MapGISTettainProviderUtil.js, line 9

根据级数、行号和列号来筛选可用的地形图层

Name Type Description
layers Array.<Object>

地形图层数组

level Number

级数

x Number

行号

y Number

列号

Returns:
Type Description
Object 可用的地形图层

getM3DOptions(subLayer){Object}

view/utils/support/utils.js, line 471

获取m3d构造参数

Name Type Description
subLayer IGSSceneSubLayer

场景图层子图层对象

Returns:
Type Description
Object m3d构造参数

getMapGISM3DSetRenderer(renderer){Object|Array}

view/utils/support/utils.js, line 230

将common层的renderer转为MapGISM3DSet需要的renderer,renderer可以为数组,格式为[{layerID:'', renderer: {}}]

Name Type Description
renderer Object | Array.<Object> | RendererCollection

common层的renderer的对象

Returns:
Type Description
Object | Array MapGISM3DSet需要的renderer

getMapRefOptions(subLayer){Object}

view/utils/support/utils.js, line 374

获取覆盖物图层构造参数

Name Type Description
subLayer IGSSceneSubLayer

场景图层子图层对象

Returns:
Type Description
Object 覆盖物图层构造参数

getOpacityExpression(opacity){String}

view/utils/support/utils.js, line 1040

获取Cesium.Cesium3DTileStyle的透明度表达式字符串

Name Type Description
opacity Number

透明度,0到1之间的值

Returns:
Type Description
String 透明度表达式字符串

getPointOptionsFromSimpleMarkerSymbol(symbol){Object}

document/support/graphic/support/EntityUtils.js, line 8

通过符号来构造一个entity的点构造参数

Name Type Description
symbol Symbol

符号对象

Returns:
Type Description
Object entity的点构造参数

getProviderExtent(layer, tilingSchemeRectangle){Extent}

view/utils/support/utils.js, line 177

获取provider的范围,并将范围统一成4326坐标系

Name Type Description
layer Object

基本图层对象

tilingSchemeRectangle Object

瓦片平铺规则的矩形范围

Returns:
Type Description
Extent cesium中provider的范围

getShadows(symbolLayer){Number}

document/support/graphic/support/Symbol3DLayerUtils.js, line 394

获取cesium的阴影模式

Name Type Description
symbolLayer Object

三维符号图层

Returns:
Type Description
Number Cesium的阴影模式

getTerrainAndModelHeight(terrainHeight, modelHeight){Number}

document/support/graphic/support/Utils.js, line 23

从地形高程采样和模型高程采样中获取最高高度

Name Type Description
terrainHeight Number

地形采样高度

modelHeight Number

模型采样高度

Returns:
Type Description
Number 最高高度

getTerrainOptions(options){Object}

view/utils/support/utils.js, line 536

获取地形参数

Name Type Description
options Object

地形参数

Returns:
Type Description
Object 地形参数

getTilingScheme(spatialReference, extent, tileInfo, axisDirection){Object}

view/utils/support/utils.js, line 65

从SpatialReference中获取TilingScheme对象给cesium使用

Name Type Description
spatialReference SpatialReference

坐标系对象

extent Extent

坐标系对象

tileInfo TileInfo

坐标系对象

axisDirection Object

坐标系对象

Returns:
Type Description
Object TilingScheme对象

getWebglVersion(gl){Number}

engineExtensions/util/ShaderUtil.js, line 6

获取WebGL的版本

Name Type Description
gl WebGLRenderingContext

WebGLRenderingContext对象

Returns:
Type Description
Number 0:WebGL不支持或非WebGL对象;1:WebGL 1.0;2:WebGL 2.0;

initResourceByUrl(url, options){Cesium.Resource}

engineExtensions/scene/imageryProvider/support/Utils.js, line 17

通过url构造Cesium.Resource对象,请求参数的优先级:?号后的参数<resource.queryParameters<外部传入的请求参数

Name Type Description
url Cesium.Resource | String

url对象

options Object

额外构造参数

Name Type Default Description
headers Object {} 可选

请求头参数

queryParameters Object {} 可选

请求参数对象,格式为{ key1: value1, key2: value2,... }

enableMatchString Boolean true 可选

是否开启基地址模版字符串匹配

Returns:
Type Description
Cesium.Resource 构造好的Cesium.Resource对象

isGeographic(projection){Boolean}

engineExtensions/util/ProjectionUtil.js, line 14

判断projection对象投影是否是地理经纬度坐标系

Name Type Description
projection *
Returns:
Type Description
Boolean
Example
isGeographic = Cesium.isGeographic(projection);

isMapGISCesium(){Boolean}

util/isMapGISCesium.js, line 9

判断当前使用的Cesium引擎是否为MapGIS Cesium引擎

Returns:
Type Description
Boolean true为MMapGIS Cesium引擎,false为第三方Cesium引擎

isPromise(promiseOrValue){boolean}

engineExtensions/util/when.js, line 400

Determines if promiseOrValue is a promise or not. Uses the feature test from http://wiki.commonjs.org/wiki/Promises/A to determine if promiseOrValue is a promise.

Name Type Description
promiseOrValue *

anything

Returns:
Type Description
boolean true if promiseOrValue is a Promise

isSample(feature){Boolean}

document/support/graphic/support/Utils.js, line 772

判断是否要采样

Name Type Description
feature Feature

要判断的要素对象

Returns:
Type Description
Boolean 是否要采样

isViewerDestroyed(viewer){Boolean}

document/support/graphic/support/Utils.js, line 886

判断Cesium的Viewer对象是否销毁

Name Type Description
viewer Object

Cesium的Viewer对象

Returns:
Type Description
Boolean Cesium的Viewer对象是否销毁

join(){Promise}

engineExtensions/util/when.js, line 538

Joins multiple promises into a single returned promise.

Returns:
Type Description
Promise a promise that will fulfill when all the input promises have fulfilled, or will reject when any one of the input promises rejects.

map(promise, mapFunc){Promise}

engineExtensions/util/when.js, line 554

Traditional map function, similar to Array.prototype.map(), but allows input to contain Promises and/or values, and mapFunc may return either a value or a Promise

Name Type Description
promise Array | Promise

array of anything, may contain a mix of Promises and values

mapFunc function

mapping function mapFunc(value) which may return either a Promise or value

Returns:
Type Description
Promise a Promise that will resolve to an array containing the mapped output values.

parseLabelClass(labelClass){*}

engineExtensions/scene/support/dynamicLabel/DynamicLabel.js, line 14
Name Type Description
labelClass *
Returns:
Type Description
*

prepareFontStyle(fontStyle)

engineExtensions/scene/vectortile/FontUtil.js, line 20

https://developer.mozilla.org/en-US/docs/Web/CSS/font-style

Name Type Description
fontStyle
Returns:
CSS font style.

prepareFontWeight(fontWeight)

engineExtensions/scene/vectortile/FontUtil.js, line 50

https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight

Name Type Description
fontWeight
Returns:
CSS font weight.

processQueue(queue, value)

engineExtensions/util/when.js, line 669

Apply all functions in queue to value

Name Type Description
queue Array

array of functions to execute

value *

argument passed to each function

redefineAspectArrowMaterial(options)

engineExtensions/material/Material.js, line 260

重新注册AspectArrowMaterial材质,主动调用才会注册,如果已经注册了,则不会重新注册

Name Type Description
options Object

初始化参数

Name Type Description
webGLRenderingContext WebGLRenderingContext 可选

webgl对象,根据其不版本来判断是否将GLSL 300语法转换为GLSL 100语法,如果不设置该值,则直接将GLSL 300语法转换为GLSL 100语法

redefineCircleWaveMaterial()

engineExtensions/material/Material.js, line 192

重新注册CircleWaveMaterial材质,主动调用才会注册,如果已经注册了,则不会重新注册

redefineGetUrlComponent()

engineExtensions/core/Resource.js, line 189

重写Cesium.Resource的getUrlComponent方法

redefineGlobeSurfaceTilePrototype()

engineExtensions/scene/GlobeSurfaceTile.js, line 4

重写cesium对象GlobeSurfaceTile中的方法

redefineGlobeSurfaceTileProviderPrototype()

engineExtensions/scene/GlobeSurfaceTileProvider.js, line 60

重写cesium对象GlobeSurfaceTileProvider中的方法

redefineImageryLayerPrototype()

engineExtensions/scene/ImageryLayer.js, line 64

重写cesium对象ImageryLayer中的方法

redefineMakeRequestByWhen()

engineExtensions/core/Resource.js, line 43

如果Cesium.when方法存在,则使用Cesium.when来重定义_makeRequest方法

redefineMakeRequestWithoutWhen()

engineExtensions/core/Resource.js, line 110

如果Cesium.when方法不存在,则使用defer来重定义_makeRequest方法

engineExtensions/material/Material.js, line 133

重新注册PolylineTrailLink材质,主动调用才会注册,如果已经注册了,则不会重新注册

Name Type Description
options Object

初始化参数

Name Type Description
webGLRenderingContext WebGLRenderingContext 可选

webgl对象,根据其不版本来判断是否将GLSL 300语法转换为GLSL 100语法,如果不设置该值,则直接将GLSL 300语法转换为GLSL 100语法

redefineRadarMaterial()

engineExtensions/material/Material.js, line 226

重新注册RadarMaterial材质,主动调用才会注册,如果已经注册了,则不会重新注册

redefineResourceConstructor()

engineExtensions/core/Resource.js, line 264

重定义Resource的构造函数

redefineResourcePrototype()

engineExtensions/core/Resource.js, line 318

重定义Resource原型链上的方法

redefineTextImageMaterial(options)

engineExtensions/material/Material.js, line 313

重新注册TextImageMaterial材质,主动调用才会注册,如果已经注册了,则不会重新注册

Name Type Description
options Object

初始化参数

Name Type Description
webGLRenderingContext WebGLRenderingContext 可选

webgl对象,根据其不版本来判断是否将GLSL 300语法转换为GLSL 100语法,如果不设置该值,则直接将GLSL 300语法转换为GLSL 100语法

redefineTileImageryPrototype()

engineExtensions/scene/TileImagery.js, line 4

重写cesium对象TileImagery中的方法

redefineWebMapTileServiceImageryProviderPrototype()

engineExtensions/scene/imageryProvider/WebMapTileServiceImageryProvider.js, line 148

重写cesium对象WebMapTileServiceImageryProvider中的方法

reduce(promise, reduceFunc){Promise}

engineExtensions/util/when.js, line 609

Traditional reduce function, similar to Array.prototype.reduce(), but input may contain promises and/or values, and reduceFunc may return either a value or a promise, and initialValue may be a promise for the starting value.

Name Type Description
promise Array | Promise

array or promise for an array of anything, may contain a mix of promises and values.

reduceFunc function

reduce function reduce(currentValue, nextValue, index, total), where total is the total number of items being reduced, and will be the same in each call to reduceFunc.

Returns:
Type Description
Promise that will resolve to the final reduced value

reject(promiseOrValue){Promise}

engineExtensions/util/when.js, line 122

Returns a rejected promise for the supplied promiseOrValue. The returned promise will be rejected with:

  • promiseOrValue, if it is a value, or
  • if promiseOrValue is a promise
    • promiseOrValue's value after it is fulfilled
    • promiseOrValue's reason after it is rejected
Name Type Description
promiseOrValue *

the rejected value of the returned Promise

Returns:
Type Description
Promise rejected Promise

removeBillboardById(graphic, id)

document/support/graphic/support/Utils.js, line 680

根据Id删除billboard

Name Type Description
graphic SimpleMarkerGraphic | PictureMarkerGraphic

绘制对象

id String

要删除的billboard的id

resolve(promiseOrValue)

engineExtensions/util/when.js, line 74

Returns promiseOrValue if promiseOrValue is a Promise, a new Promise if promiseOrValue is a foreign promise, or a new, already-fulfilled Promise whose value is promiseOrValue if promiseOrValue is an immediate value.

Name Type Description
promiseOrValue *
Returns:
Guaranteed to return a trusted Promise. If promiseOrValue is a when.js Promise returns promiseOrValue, otherwise, returns a new, already-resolved, when.js Promise whose resolution value is:
  • the resolution value of promiseOrValue if it's a foreign promise, or
  • promiseOrValue if it's a value

samplePointsPromise(graphic, samplePositions, callback){Object}

document/support/graphic/support/Utils.js, line 538

通过异步方式,获取Point更新高程后的点坐标,当地形深度检测关闭时,使用此方法

Name Type Description
graphic BaseGraphic

三维几何对象

samplePositions Array.<Cesium.Cartographic>

要采样的点坐标数组

callback function

采样完成后的回调函数

Returns:
Type Description
Object 更新高程后的点坐标

sampleScene(viewer, samplePositions, objectsToExclude, elevationInfo, callback)

document/support/graphic/support/Utils.js, line 90

输入一组Cartographic坐标点,进行场景(地形和模型)高程采样,异步函数 必须要传入一个外部设置地形 不受深度检测的影响

Name Type Description
viewer Cesium.Viewer

Cesium的场景视图对象

samplePositions Array.<Cesium.Cartographic>

要采样的点坐标数组

objectsToExclude Array.<Cesium.Primitive>

要排除采样的primitive

elevationInfo ElevationInfo

高程采样信息

callback function

采样后的回调函数,callback(Array<Cesium.Cartographic>)

sampleTerrain(viewer, samplePositions, elevationInfo, callback)

document/support/graphic/support/Utils.js, line 47

输入一组Cartographic坐标点,进行地形高程采样,异步函数, 当使用默认地形时,仍可进行高程采样 不受深度检测的影响

Name Type Description
viewer Cesium.Viewer

Cesium的场景对象

samplePositions Array.<Cesium.Cartographic>

要采样的点坐标数组

elevationInfo ElevationInfo

高程采样信息

callback function

采样后的回调函数,callback(Array<Cesium.Cartographic>)

some(promisesOrValues, howMany, onFulfilled, onRejected, onProgress){Promise}

engineExtensions/util/when.js, line 420

Initiates a competitive race, returning a promise that will resolve when howMany of the supplied promisesOrValues have resolved, or will reject when it becomes impossible for howMany to resolve, for example, when (promisesOrValues.length - howMany) + 1 input promises reject.

Name Type Description
promisesOrValues Array

array of anything, may contain a mix of promises and values

howMany number

number of promisesOrValues to resolve

onFulfilled function 可选 nullable

resolution handler

onRejected function 可选 nullable

rejection handler

onProgress function 可选 nullable

progress handler

Returns:
Type Description
Promise promise that will resolve to an array of howMany values that resolved first, or will reject with an array of (promisesOrValues.length - howMany) + 1 rejection reasons.

toLabelClass(defaultLabelClass, text, overWrite, properties){*}

engineExtensions/scene/vectortile/MutTextObjectUtil.js, line 12
Name Type Description
defaultLabelClass LabelClass
text *
overWrite LabelClass | null

覆盖属性

properties

要素属性

Returns:
Type Description
*

when(promiseOrValue, onFulfilled, onRejected, onProgress){Promise}

engineExtensions/util/when.js, line 56

Register an observer for a promise or immediate value.

Name Type Description
promiseOrValue *
onFulfilled function 可选 nullable

callback to be called when promiseOrValue is successfully fulfilled. If promiseOrValue is an immediate value, callback will be invoked immediately.

onRejected function 可选 nullable

callback to be called when promiseOrValue is rejected.

onProgress function 可选 nullable

callback to be called when progress updates are issued for promiseOrValue.

Returns:
Type Description
Promise a new Promise that will complete with the return value of callback or errback or the completion value of promiseOrValue if callback and/or errback is not supplied.

zoomToBoundingSphere(boundingSphere, options, innerView)

view/utils/support/utils.js, line 639

根据外包盒进行跳转

Name Type Description
boundingSphere Object

M3D的外包球

options Object

跳转参数

Name Type Description
complete function 可选

跳转完毕回调

cancel function 可选

跳转取消回调

orientation Object 可选

跳转朝向HeadingPitchRange

innerView View

Cesium的View对象