类名 Global

成员变量

# getViewModel

获取/设置模型编辑器

Object

# hasText

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

String

# constant InitializeOptionsType

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

属性:
Name Type Description
MapGISM3DSet String

MapGISM3DSet:M3D对象

MapGISTerrainProvider String

MapGISTerrainProvider:MapGIS地形对象

MapGISDynamicLabelCollection String

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

MapGISMapServerImageryProvider String

MapGISMapServerImageryProvider:覆盖物图层IGS 2.0 SceneServer

UrlTemplateImageryProvider String

UrlTemplateImageryProvider:覆盖物图层IGS 1.0 g3d

Object

# materials

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
String

# shaderSource

The glsl shader source for this material.

Default Value:
  • undefined

# startTime

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

# terrainProvider

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

Boolean | function

# translucent

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

Default Value:
  • undefined
String

# type

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
Object

# uniforms

Maps uniform names to their values.

Default Value:
  • undefined

方法

# _getCurrentRepeatDetail()

*

# _renderLabelInDecentralize(polyline3D, collection, startRate, endRate, textArr, id, options)

参数:

名称 类型 描述
polyline3D *

线几何计算类

collection *

注记容器

startRate *

开始分段

endRate *

结束分段

textArr *

文字分段数组

id *

注记id

options *

注记选项

*

# addBillboardPrimitive(graphic, position, success)

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

参数:

名称 类型 描述
graphic SimpleMarkerGraphic | PictureMarkerGraphic

要采样的绘制对象

position Cesium.Cartographic

要采样的点坐标数组

success function

几何添加完毕回调

# addMapRefLayer(mapRefOption, sublayerView)

添加覆盖物图层

参数:

名称 类型 描述
mapRefOption Object

覆盖物图层构造参数

sublayerView IGSSceneSubLayerView

Cesium的view对象

覆盖物图层innerLayer对象

Object

# addPointPrimitive(graphic, position, success)

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

参数:

名称 类型 描述
graphic SimpleMarkerGraphic | PictureMarkerGraphic

要采样的绘制对象

position Cesium.Cartographic

要采样的点坐标数组

success function

几何添加完毕回调

# addrewriteQueryParameters()

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

# any(promisesOrValues, onFulfilledopt, nullable, onRejectedopt, nullable, onProgressopt, nullable)

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.

参数:

名称 类型 描述
promisesOrValues Array | Promise

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

onFulfilled function

resolution handler

onRejected function

rejection handler

onProgress function

progress handler

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

Promise

# buildModuleUrl(relativeUrl)

Given a relative URL under the MapGIS base URL, returns an absolute URL.

参数:

名称 类型 描述
relativeUrl String

The relative path.

The absolutely URL representation of the provided path.

String

# chain(promiseOrValue, resolver, resolveValueopt)

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

参数:

名称 类型 描述
promiseOrValue
resolver Object
resolve function
reject function
resolveValue *
Promise

# convertCommonRendererToM3DRenderer(renderer)

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

参数:

名称 类型 描述
renderer Object

common层的renderer的对象

MapGISM3DSet需要的renderer

Object

# convertMapGISTextToLabelClass()

转换文字

*

# convertPictureMarkerSymbolToGraphicStyle(type, paintStyle, symbol)

转换点符号为Cesium Graphics样式

参数:

名称 类型 描述
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

*

# convertShadeToGLSL100(input, isFragmentShader)

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

参数:

名称 类型 描述
input String

GLSL 300版本的Shader代码

isFragmentShader Boolean

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

转换后的Shader代码

String

# convertSimpleFillSymbolToGraphicStyle(type, paintStyle, symbol)

转换填充符号为Cesium Graphics样式

参数:

名称 类型 描述
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

*

# convertSimpleLineSymbolToGraphicStyle(type, paintStyle, symbol)

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

参数:

名称 类型 描述
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

*

# convertSimpleMarkerSymbolToGraphicStyle(type, paintStyle, symbol)

转换点符号为Cesium Graphics样式

参数:

名称 类型 描述
type String

几何样式

paintStyle *

graphics样式

symbol *

符号

*

# createBaseLineMaterial(color, type)

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

参数:

名称 类型 描述
color Object

Cesium的颜色对象

type String

线类型

创建好的cesium的线材质对象

Object

# createBillboard(symbolLayer, position, options)

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

参数:

名称 类型 默认值 描述
symbolLayer IconSymbol3DLayer

三维图标图层

position Array.<Number>

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

options Object

额外参数

image Object

billboard的图片url

show Boolean true

是否显示

layerOpacity Number 1

图层透明度

graphic BaseGraphic

三维的几何对象

billboard构造参数

Object

# createGraphic(object)

创建cesium 几何对象

参数:

名称 类型 描述
object Object

几何体options

zondy.cesium.Graphic

# createObject3DAppearance(symbolLayer, options)

通过ObjectSymbol3DLayer来构造外观对象

参数:

名称 类型 默认值 描述
symbolLayer ObjectSymbol3DLayer

三维对象图层

options Object

额外参数

layerOpacity Number 1

额外参数

三维的外观对象

Object

# createSegmentsGeometry()

创建粒子段的几何形状

# defer()

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.

Deferred

# demodernizeShader(gl, input, isFragmentShader)

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

参数:

名称 类型 描述
gl WebGLRenderingContext

WebGLRenderingContext对象

input String

GLSL 300版本的Shader代码

isFragmentShader Boolean

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

转换后的Shader代码

String

# getBillboardAnchor(anchor)

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

参数:

名称 类型 描述
anchor AnchorType

三维Billboard符号的锚点

Cesium的锚点

Object

# getBillboardAndLabelSample(graphic, position)

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

参数:

名称 类型 描述
graphic BaseGraphic

三维几何对象

position Array.<Number>

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

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

Object

# getBillboardOptionsFromPictureMarkerSymbol(symbol)

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

参数:

名称 类型 描述
symbol Symbol

符号对象

entity的点构造参数

Object

# getBillboardOptionsFromSimpleMarkerSymbol(symbol)

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

参数:

名称 类型 描述
symbol Symbol

符号对象

entity的点构造参数

Object

# getClassificationTyp(elevationMode)

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

参数:

名称 类型 描述
elevationMode ElevationMode

高度模式

Cesium的ClassificationTyp值

Number

# getExcludePrimitivesInModelSample(viewer)

获取在模型采样中,要排除的primitives

参数:

名称 类型 描述
viewer Cesium.Viewer

场景视图对象

要排除的primitives

Array.<Cesium.Primitive>

# getFeatureBySymbolLayer(symbolLayer, type, position, graphic)

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

参数:

名称 类型 描述
symbolLayer Symbol3DLayer

三维符号图层对象

type SymbolType

符号类型

position Cesium.Cartographic

点坐标

graphic BaseGraphic

三维几何对象

要素对象

Feature

# getLayerByUrl(url, LayerConstructor)

通过url构造Common的图层对象

参数:

名称 类型 描述
url String

服务基地址

LayerConstructor Layer

图层构造函数

构造好的图层对象

Layer

# getLayerToUse(layers, level, x, y)

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

参数:

名称 类型 描述
layers Array.<Object>

地形图层数组

level Number

级数

x Number

行号

y Number

列号

可用的地形图层

Object

# getM3DOptions(subLayer)

获取m3d构造参数

参数:

名称 类型 描述
subLayer IGSSceneSubLayer

场景图层子图层对象

m3d构造参数

Object

# getMapGISM3DSetRenderer(renderer)

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

参数:

名称 类型 描述
renderer Object | Array.<Object>

common层的renderer的对象

MapGISM3DSet需要的renderer

Object

# getMapRefOptions(subLayer)

获取覆盖物图层构造参数

参数:

名称 类型 描述
subLayer IGSSceneSubLayer

场景图层子图层对象

覆盖物图层构造参数

Object

# getOpacityExpression(opacity)

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

参数:

名称 类型 描述
opacity Number

透明度,0到1之间的值

透明度表达式字符串

String

# getPointOptionsFromSimpleMarkerSymbol(symbol)

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

参数:

名称 类型 描述
symbol Symbol

符号对象

entity的点构造参数

Object

# getProviderExtent(layer, tilingSchemeRectangle)

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

参数:

名称 类型 描述
layer Object

基本图层对象

tilingSchemeRectangle Object

瓦片平铺规则的矩形范围

cesium中provider的范围

Extent

# getShadows(symbolLayer)

获取cesium的阴影模式

参数:

名称 类型 描述
symbolLayer Object

三维符号图层

Cesium的阴影模式

Number

# getTerrainAndModelHeight(terrainHeight, modelHeight)

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

参数:

名称 类型 描述
terrainHeight Number

地形采样高度

modelHeight Number

模型采样高度

最高高度

Number

# getTerrainOptions(options)

获取地形参数

参数:

名称 类型 描述
options Object

地形参数

地形参数

Object

# getTilingScheme(spatialReference, extent, tileInfo, axisDirection)

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

参数:

名称 类型 描述
spatialReference SpatialReference

坐标系对象

extent Extent

坐标系对象

tileInfo TileInfo

坐标系对象

axisDirection Object

坐标系对象

TilingScheme对象

Object

# getWebglVersion(gl)

获取WebGL的版本

参数:

名称 类型 描述
gl WebGLRenderingContext

WebGLRenderingContext对象

0:WebGL不支持或非WebGL对象;1:WebGL 1.0;2:WebGL 2.0;

Number

# initResourceByUrl(url, options)

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

参数:

名称 类型 默认值 描述
url Cesium.Resource | String

url对象

options Object

额外构造参数

headers Object {}

请求头参数

queryParameters Object {}

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

enableMatchString Boolean true

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

构造好的Cesium.Resource对象

Cesium.Resource

# isGeographic(projection)

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

参数:

名称 类型 描述
projection *
Boolean
示例
isGeographic = Cesium.isGeographic(projection);

# isPromise(promiseOrValue)

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.

参数:

名称 类型 描述
promiseOrValue *

anything

true if promiseOrValue is a Promise

boolean

# isSample(feature)

判断是否要采样

参数:

名称 类型 描述
feature Feature

要判断的要素对象

是否要采样

Boolean

# join()

Joins multiple promises into a single returned promise.

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

Promise

# map(promise, mapFunc)

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

参数:

名称 类型 描述
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

a Promise that will resolve to an array containing the mapped output values.

Promise

# parseLabelClass(labelClass)

参数:

名称 类型 描述
labelClass *
*

# prepareFontStyle(fontStyle)

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

参数:

名称 类型 描述
fontStyle

CSS font style.

# prepareFontWeight(fontWeight)

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

参数:

名称 类型 描述
fontWeight

CSS font weight.

# processQueue(queue, value)

Apply all functions in queue to value

参数:

名称 类型 描述
queue Array

array of functions to execute

value *

argument passed to each function

# redefineAspectArrowMaterial(options)

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

参数:

名称 类型 描述
options Object

初始化参数

webGLRenderingContext WebGLRenderingContext

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

# redefineCircleWaveMaterial()

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

# redefineGetUrlComponent()

重写Cesium.Resource的getUrlComponent方法

# redefineGlobeSurfaceTileProviderPrototype()

重写cesium对象GlobeSurfaceTileProvider中的方法

# redefineImageryLayerPrototype()

重写cesium对象ImageryLayer中的方法

# redefineMakeRequestByWhen()

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

# redefineMakeRequestWithoutWhen()

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

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

参数:

名称 类型 描述
options Object

初始化参数

webGLRenderingContext WebGLRenderingContext

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

# redefineRadarMaterial()

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

# redefineResourceConstructor()

重定义Resource的构造函数

# redefineResourcePrototype()

重定义Resource原型链上的方法

# redefineTextImageMaterial(options)

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

参数:

名称 类型 描述
options Object

初始化参数

webGLRenderingContext WebGLRenderingContext

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

# redefineWebMapTileServiceImageryProviderPrototype()

重写cesium对象WebMapTileServiceImageryProvider中的方法

# reduce(promise, reduceFunc)

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.

参数:

名称 类型 描述
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.

that will resolve to the final reduced value

Promise

# reject(promiseOrValue)

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

参数:

名称 类型 描述
promiseOrValue *

the rejected value of the returned Promise

rejected Promise

Promise

# resolve(promiseOrValue)

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.

参数:

名称 类型 描述
promiseOrValue *

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)

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

参数:

名称 类型 描述
graphic BaseGraphic

三维几何对象

samplePositions Array.<Cesium.Cartographic>

要采样的点坐标数组

callback function

采样完成后的回调函数

更新高程后的点坐标

Object

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

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

参数:

名称 类型 描述
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)

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

参数:

名称 类型 描述
viewer Cesium.Viewer

Cesium的场景对象

samplePositions Array.<Cesium.Cartographic>

要采样的点坐标数组

elevationInfo ElevationInfo

高程采样信息

callback function

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

# some(promisesOrValues, howMany, onFulfilledopt, nullable, onRejectedopt, nullable, onProgressopt, nullable)

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.

参数:

名称 类型 描述
promisesOrValues Array

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

howMany number

number of promisesOrValues to resolve

onFulfilled function

resolution handler

onRejected function

rejection handler

onProgress function

progress handler

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.

Promise

# toLabelClass(defaultLabelClass, text, overWrite, properties)

参数:

名称 类型 描述
defaultLabelClass LabelClass
text *
overWrite LabelClass | null

覆盖属性

properties

要素属性

*

# when(promiseOrValue, onFulfilledopt, nullable, onRejectedopt, nullable, onProgressopt, nullable)

Register an observer for a promise or immediate value.

参数:

名称 类型 描述
promiseOrValue *
onFulfilled function

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

onRejected function

callback to be called when promiseOrValue is rejected.

onProgress function

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

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.

Promise

# zoomToM3DLayer(boundingSphere, options, innerView)

根据M3D的外包盒进行跳转

参数:

名称 类型 描述
boundingSphere Object

M3D的外包球

options Object

跳转参数

innerView View

Cesium的View对象

构造函数
成员变量
方法
事件