new Cesium.GridImageryProvider(options)

在每块瓷砖上画一个有可控背景和发光的线框网格的 ImageryProvider . 可能对自定义渲染效果或调试地形有用 .
Name Type Description
options GridImageryProvider.ConstructorOptions 描述初始化选项的对象

Members

readonly credit : Credit

当图像提供者活动时, 获得信用值以显示 。 通常,这是用来信用的 图像的来源.

readonly errorEvent : Event

获得一个在图像提供者遇到同步错误时上升的事件 。 通过签名 对事件,您将被通知错误,并有可能从中恢复。 活动听众 are passed an instance of TileProviderError.

readonly hasAlphaChannel : boolean

获得一个表示图像提供者是否提供的图像的值 包括一个α通道。 如果这个属性是虚假的, 一个 alpha 通道, 如果存在, 将会 将被忽略。 如果此属性属实, 任何没有 alpha 通道的图像都会被处理 好像他们的α是1.0 到处都是。 当此属性为虚假时, 内存使用 并缩短纹理上传时间.

readonly maximumLevel : number|undefined

获取可以请求的最多详细级别.

readonly minimumLevel : number

获取可以请求的最小详细级别.

readonly proxy : Proxy

获取此提供者使用的代理 .

readonly rectangle : Rectangle

用弧度表示这个例子提供的图像的矩形.

readonly tileDiscardPolicy : TileDiscardPolicy

获取瓷砖丢弃策略 。 如果未定义, 丢弃策略负责 用于通过它应当的DiscardImage函数过滤出“缺少”牌。 如果此函数 返回未定义,不过滤牌.

readonly tileHeight : number

获得每个瓦片的高度,以像素为单位.

readonly tileWidth : number

获得每个瓦片的宽度,以像素为单位.

readonly tilingScheme : TilingScheme

获得此提供者使用的平板方案 .

Methods

_createGridCanvas()

将网格带入背景和光芒的画布

_drawGrid()

将线网绘制成画布.

getTileCredits(x, y, level)Array.<Credit>

获得在显示特定瓦片时显示的信用值.
Name Type Description
x number 瓷砖X坐标.
y number 瓦片Y坐标.
level number 瓦片级;
Returns:
显示瓷砖时要显示的信用值 .

pickFeatures(x, y, level, longitude, latitude)undefined

Picking 特性目前不被此图像提供者支持, 因此此函数仅返回 undefined.
Name Type Description
x number 瓷砖X坐标.
y number 瓦片Y坐标.
level number 瓦片级.
longitude number 选择特征的经度 .
latitude number 选择特征的纬度.
Returns:
不支持选择后未定义 .

requestImage(x, y, level, request)Promise.<HTMLCanvasElement>

请求给定的瓦片的图像 .
Name Type Description
x number 瓷砖X坐标.
y number 瓦片Y坐标.
level number 瓦片级.
request Request optional 请求对象 。 仅供内部使用.
Returns:
The resolved image as a Canvas DOM object.

Type Definitions

Cesium.GridImageryProvider.ConstructorOptions

GridImagery 创建器的初始化选项
Properties:
Name Type Attributes Default Description
tilingScheme TilingScheme <optional>
new GeographicTilingScheme() The tiling scheme for which to draw tiles.
ellipsoid Ellipsoid <optional>
Ellipsoid.default The ellipsoid. If the tilingScheme is specified, 此参数被忽略, 并使用平面图的椭圆形 。 如果没有 指定参数,使用默认椭圆.
cells number <optional>
8 The number of grids cells.
color Color <optional>
颜色(1.0、1.0、1.0、0.4) 绘制网格线的颜色 .
glowColor Color <optional>
颜色(0.0、1.0、0.0、0.05) 绘制网格线的光线的颜色 .
glowWidth number <optional>
6 The width of lines used for rendering the line glow effect.
backgroundColor Color <optional>
颜色(0.0、0.5、0.0、0.2) 背景填充颜色.
tileWidth number <optional>
256 为详细选择目的的瓦片宽度.
tileHeight number <optional>
256 为详细选择目的的瓦片高度.
canvasSize number <optional>
256 渲染用的画布大小.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.