图像层,显示来自单个图像提供者的平铺图像数据 An imagery layer that displays tiled image data from a single imagery provider on a
Globe or Cesium3DTileset.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
imageryProvider |
ImageryProvider | 可选 optional 要使用的图像提供者。 The imagery provider to use. |
options |
ImageryLayer.ConstructorOptions | 可选 optional 描述初始化选项的对象 An object describing initialization options |
ImageryLayer.fromProviderAsync用于从异步图像提供者创建图像层。 for creating an imagery layer from an asynchronous imagery provider.ImageryLayer.fromWorldImagery用于为Cesium离子的默认全局基础图像层创建图像层。 for creating an imagery layer for Cesium ion's default global base imagery layer.Scene#imageryLayers用于向地球添加图像层。 for adding an imagery layer to the globe.Cesium3DTileset#imageryLayers用于将图像图层添加到 3D 图块集。 for adding an imagery layer to a 3D tileset.
示例: Examples:
// Add an OpenStreetMaps layer
const imageryLayer = new Cesium.ImageryLayer(new Cesium.OpenStreetMapImageryProvider({
url: "https://tile.openstreetmap.org/"
}));
scene.imageryLayers.add(imageryLayer);
// Add Cesium ion's default world imagery layer
const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
scene.imageryLayers.add(imageryLayer);
// Add a new transparent layer from Cesium ion
const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
imageryLayer.alpha = 0.5;
scene.imageryLayers.add(imageryLayer);
// Drape Bing Maps Aerial imagery over a 3D tileset
const tileset = await Cesium.Cesium3DTileset.fromUrl(
"http://localhost:8002/tilesets/Seattle/tileset.json"
);
scene.primitives.add(tileset);
const imageryProvider = await Cesium.createWorldImageryAsync({
style: Cesium.IonWorldImageryStyle.AERIAL,
});
const imageryLayer = new ImageryLayer(imageryProvider);
tileset.imageryLayers.add(imageryLayer);
另见: See:
成员 Members
如果在构建过程中或图像提供商未提供该值,则该值将用作颜色到 Alpha 的默认阈值。 This value is used as the default threshold for color-to-alpha if one is not provided during construction or by the imagery provider.
-
默认值: Default Value:
0.004
如果在构建过程中或图像提供商未提供该值,则该值将用作图像图层的默认亮度。该值不会修改图像的亮度。 This value is used as the default brightness for the imagery layer if one is not provided during construction or by the imagery provider. This value does not modify the brightness of the imagery.
-
默认值: Default Value:
1.0
如果在构建过程中或图像提供商未提供此值,则该值将用作图像图层的默认对比度。该值不会修改图像的对比度。 This value is used as the default contrast for the imagery layer if one is not provided during construction or by the imagery provider. This value does not modify the contrast of the imagery.
-
默认值: Default Value:
1.0
如果在构建过程中或图像提供商未提供该值,则该值将用作图像图层的默认伽玛值。该值不会修改图像的伽玛值。 This value is used as the default gamma for the imagery layer if one is not provided during construction or by the imagery provider. This value does not modify the gamma of the imagery.
-
默认值: Default Value:
1.0
如果在构建过程中或图像提供商未提供该值,则该值将用作图像图层的默认色调。该值不会修改图像的色调。 This value is used as the default hue for the imagery layer if one is not provided during construction or by the imagery provider. This value does not modify the hue of the imagery.
-
默认值: Default Value:
0.0
static Cesium.ImageryLayer.DEFAULT_MAGNIFICATION_FILTER : TextureMagnificationFilter
如果在构建过程中或图像提供者未提供此值,则该值将用作图像图层的默认纹理放大过滤器。 This value is used as the default texture magnification filter for the imagery layer if one is not provided during construction or by the imagery provider.
-
默认值: Default Value:
TextureMagnificationFilter.LINEAR
static Cesium.ImageryLayer.DEFAULT_MINIFICATION_FILTER : TextureMinificationFilter
如果在构建过程中或图像提供者未提供此值,则该值将用作图像图层的默认纹理缩小过滤器。 This value is used as the default texture minification filter for the imagery layer if one is not provided during construction or by the imagery provider.
-
默认值: Default Value:
TextureMinificationFilter.LINEAR
如果在构建过程中或图像提供商未提供该值,则该值将用作图像图层的默认饱和度。该值不会修改图像的饱和度。 This value is used as the default saturation for the imagery layer if one is not provided during construction or by the imagery provider. This value does not modify the saturation of the imagery.
-
默认值: Default Value:
1.0
static Cesium.ImageryLayer.DEFAULT_SPLIT : SplitDirection
如果在构建过程中或图像提供商未提供此值,则该值将用作图像图层的默认分割。 This value is used as the default split for the imagery layer if one is not provided during construction or by the imagery provider.
-
默认值: Default Value:
SplitDirection.NONE
该图层的alpha混合值,0.0代表完全透明,1.0代表完全不透明。 The alpha blending value of this layer, with 0.0 representing fully transparent and 1.0 representing fully opaque.
-
默认值: Default Value:
1.0
该层的亮度。 1.0 使用未修改的图像颜色。小于 1.0 会使图像变暗,而大于 1.0 会使图像变亮。 The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 makes the imagery darker while greater than 1.0 makes it brighter.
-
默认值: Default Value:
ImageryLayer.DEFAULT_BRIGHTNESS
colorToAlpha : Color
应设置为透明的颜色值。 Color value that should be set to transparent.
颜色到 Alpha 的标准化 (0-1) 阈值。 Normalized (0-1) threshold for color-to-alpha.
该层的对比度。 1.0 使用未修改的图像颜色。小于 1.0 会降低对比度,而大于 1.0 则会增加对比度。 The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the contrast while greater than 1.0 increases it.
-
默认值: Default Value:
ImageryLayer.DEFAULT_CONTRAST
cutoutRectangle : Rectangle
该图像层中的矩形切口。 Rectangle cutout in this layer of imagery.
该图层在地球白天一侧的 alpha 混合值,0.0 表示完全透明,1.0 表示完全不透明。这仅在以下情况下生效 The alpha blending value of this layer on the day side of the globe, with 0.0 representing fully transparent and 1.0 representing fully opaque. This only takes effect when
Globe#enableLighting is true.
-
默认值: Default Value:
1.0
readonly errorEvent : Event.<ImageryLayer.ErrorEventCallback>
获取当图像提供程序遇到异步错误时引发的事件。通过订阅该事件,您将收到错误通知,并有可能从中恢复。向事件侦听器传递抛出的错误的实例。 Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing to the event, you will be notified of the error and can potentially recover from it. Event listeners are passed an instance of the thrown error.
应用于该层的伽玛校正。 1.0 使用未修改的图像颜色。 The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.
-
默认值: Default Value:
ImageryLayer.DEFAULT_GAMMA
该图层的色调(以弧度为单位)。 0.0 使用未修改的图像颜色。 The hue of this layer in radians. 0.0 uses the unmodified imagery color.
-
默认值: Default Value:
ImageryLayer.DEFAULT_HUE
readonly imageryProvider : ImageryProvider
获取该图层的图像提供者。这不应该被调用之前 Gets the imagery provider for this layer. This should not be called before
ImageryLayer#ready 返回真。 returns true.
magnificationFilter : TextureMagnificationFilter
The
TextureMagnificationFilter 应用于该层。可能的值为 to apply to this layer. Possible values are TextureMagnificationFilter.LINEAR (默认)和 (the default) and TextureMagnificationFilter.NEAREST。要生效,必须在添加影像图层后立即设置该属性。加载纹理后,将无法更改所使用的纹理过滤器。 . To take effect, this property must be set immediately after adding the imagery layer. Once a texture is loaded it won't be possible to change the texture filter used.
-
默认值: Default Value:
ImageryLayer.DEFAULT_MAGNIFICATION_FILTER
minificationFilter : TextureMinificationFilter
The
TextureMinificationFilter 应用于该层。可能的值为 to apply to this layer. Possible values are TextureMinificationFilter.LINEAR (默认)和 (the default) and TextureMinificationFilter.NEAREST。要生效,必须在添加影像图层后立即设置该属性。加载纹理后,将无法更改所使用的纹理过滤器。 . To take effect, this property must be set immediately after adding the imagery layer. Once a texture is loaded it won't be possible to change the texture filter used.
-
默认值: Default Value:
ImageryLayer.DEFAULT_MINIFICATION_FILTER
该图层在地球夜晚一侧的 alpha 混合值,0.0 代表完全透明,1.0 代表完全不透明。这仅在以下情况下生效 The alpha blending value of this layer on the night side of the globe, with 0.0 representing fully transparent and 1.0 representing fully opaque. This only takes effect when
Globe#enableLighting is true.
-
默认值: Default Value:
1.0
当地形提供者成功创建时返回 true。否则,返回 false。 Returns true when the terrain provider has been successfully created. Otherwise, returns false.
readonly readyEvent : Event.<ImageryLayer.ReadyEventCallback>
获取在成功创建图像提供程序时引发的事件。事件侦听器将传递创建的实例 Gets an event that is raised when the imagery provider has been successfully created. Event listeners are passed the created instance of
ImageryProvider.
readonly rectangle : Rectangle
获取该层的矩形。如果这个矩形比 Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the
ImageryProvider,仅显示图像提供者的一部分。 , only a portion of the imagery provider is shown.
该层的饱和度。 1.0 使用未修改的图像颜色。小于 1.0 会降低饱和度,而大于 1.0 则会增加饱和度。 The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the saturation while greater than 1.0 increases it.
-
默认值: Default Value:
ImageryLayer.DEFAULT_SATURATION
确定是否显示该层。 Determines if this layer is shown.
-
默认值: Default Value:
true
splitDirection : SplitDirection
The
SplitDirection 应用于该层。 to apply to this layer.
-
默认值: Default Value:
ImageryLayer.DEFAULT_SPLIT
方法 Methods
static Cesium.ImageryLayer.fromProviderAsync(imageryProviderPromise, options) → ImageryLayer
从异步图像提供程序创建新的图像层。该层将处理任何异步加载或错误,并在准备好后开始渲染图像层。 Create a new imagery layer from an asynchronous imagery provider. The layer will handle any asynchronous loads or errors, and begin rendering the imagery layer once ready.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
imageryProviderPromise |
Promise.<ImageryProvider> | 对图像提供商的承诺 A promise which resolves to a imagery provider |
options |
ImageryLayer.ConstructorOptions | 可选 optional 描述初始化选项的对象 An object describing initialization options |
返回: Returns:
创建的图像层。 The created imagery layer.
示例: Examples:
// Create a new base layer
const viewer = new Cesium.Viewer("cesiumContainer", {
baseLayer: Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
});
// Add a new transparent layer
const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
imageryLayer.alpha = 0.5;
viewer.imageryLayers.add(imageryLayer);
// Handle loading events
const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
viewer.imageryLayers.add(imageryLayer);
imageryLayer.readyEvent.addEventListener(provider => {
imageryLayer.imageryProvider.errorEvent.addEventListener(error => {
alert(`Encountered an error while loading imagery tiles! ${error}`);
});
});
imageryLayer.errorEvent.addEventListener(error => {
alert(`Encountered an error while creating an imagery layer! ${error}`);
});
另见: See:
static Cesium.ImageryLayer.fromWorldImagery(options) → ImageryLayer
为 ion 的默认全局基础影像图层(当前为 Bing 地图)创建新的影像图层。该层将处理任何异步加载或错误,并在准备好后开始渲染图像层。 Create a new imagery layer for ion's default global base imagery layer, currently Bing Maps. The layer will handle any asynchronous loads or errors, and begin rendering the imagery layer once ready.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
options |
ImageryLayer.WorldImageryConstructorOptions | 描述初始化选项的对象 An object describing initialization options |
返回: Returns:
创建的图像层。 * @example // 创建一个新的基础层 constviewer = new Cesium.Viewer("cesiumContainer", { baseLayer: Cesium.ImageryLayer.fromWorldImagery(); }); The created imagery layer. * @example // Create a new base layer const viewer = new Cesium.Viewer("cesiumContainer", { baseLayer: Cesium.ImageryLayer.fromWorldImagery(); });
示例: Examples:
// Add a new transparent layer
const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
imageryLayer.alpha = 0.5;
viewer.imageryLayers.add(imageryLayer);
// Handle loading events
const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
viewer.imageryLayers.add(imageryLayer);
imageryLayer.readyEvent.addEventListener(provider => {
imageryLayer.imageryProvider.errorEvent.addEventListener(error => {
alert(`Encountered an error while loading imagery tiles! ${error}`);
});
});
imageryLayer.errorEvent.addEventListener(error => {
alert(`Encountered an error while creating an imagery layer! ${error}`);
});
另见: See:
销毁该对象持有的 WebGL 资源。销毁对象可以确定性地释放 WebGL 资源,而不是依赖垃圾收集器来销毁该对象。 Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.
一旦对象被销毁,就不应再使用;调用除 Once an object is destroyed, it should not be used; calling any function other than
一旦对象被销毁,就不应再使用;调用除 Once an object is destroyed, it should not be used; calling any function other than
isDestroyed 将导致 will result in a DeveloperError 例外。因此,分配返回值( exception. Therefore, assign the return value (undefined) 到对象,如示例中所做的那样。 ) to the object as done in the example.
抛出: Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
示例: Example:
imageryLayer = imageryLayer && imageryLayer.destroy();
另见: See:
getImageryRectangle() → Rectangle
计算该层的矩形与图像提供者的可用性矩形的交集,生成该层可以生成的图像的总体边界。 Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle, producing the overall bounds of imagery that can be produced by this layer.
返回: Returns:
一个矩形,定义该层可以生成的图像的整体边界。 A rectangle which defines the overall bounds of imagery that can be produced by this layer.
示例: Example:
// Zoom to an imagery layer.
const imageryRectangle = imageryLayer.getImageryRectangle();
scene.camera.flyTo({
destination: rectangle
});
获取一个值,该值指示该图层是否为基础图层 Gets a value indicating whether this layer is the base layer in the
ImageryLayerCollection。基础层是所有其他层之下的一层。它的特殊之处在于,通过拉伸整个地球边缘的纹素,它被视为具有全局矩形,即使实际上没有。 . The base layer is the one that underlies all others. It is special in that it is treated as if it has global rectangle, even if it actually does not, by stretching the texels at the edges over the entire globe.
返回: Returns:
如果这是基础层则为 true;否则为假。 true if this is the base layer; otherwise, false.
如果该对象被销毁则返回 true;否则为假。 Returns true if this object was destroyed; otherwise, false.
如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than
如果该对象被破坏,则不应使用它;调用除 If this object was destroyed, it should not be used; calling any function other than
isDestroyed 将导致 will result in a DeveloperError exception.
返回: Returns:
如果该对象被销毁,则为 True;否则为假。 True if this object was destroyed; otherwise, false.
另见: See:
类型定义 Type Definitions
ImageryLayer 构造函数的初始化选项。 Initialization options for the ImageryLayer constructor.
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
rectangle |
Rectangle |
<可选> <optional> |
imageryProvider.rectangle | 图层的矩形。该矩形可以限制图像提供者的可见部分。 The rectangle of the layer. This rectangle can limit the visible portion of the imagery provider. |
alpha |
number | function |
<可选> <optional> |
1.0 | 该图层的 alpha 混合值,从 0.0 到 1.0。这可以是一个简单的数字,也可以是带有签名的函数 The alpha blending value of this layer, from 0.0 to 1.0. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数会传递当前帧状态、该图层以及需要 alpha 的图像图块的 x、y 和级别坐标,并且预计会返回用于该图块的 alpha 值。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the alpha is required, and it is expected to return the alpha value to use for the tile. |
nightAlpha |
number | function |
<可选> <optional> |
1.0 | 该图层在地球夜晚一侧的 Alpha 混合值,从 0.0 到 1.0。这可以是一个简单的数字,也可以是带有签名的函数 The alpha blending value of this layer on the night side of the globe, from 0.0 to 1.0. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数会传递当前帧状态、该图层以及需要 alpha 的图像图块的 x、y 和级别坐标,并且预计会返回用于该图块的 alpha 值。这仅在以下情况下生效 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the alpha is required, and it is expected to return the alpha value to use for the tile. This only takes effect when enableLighting is true. |
dayAlpha |
number | function |
<可选> <optional> |
1.0 | 该图层在地球白天一侧的 Alpha 混合值,从 0.0 到 1.0。这可以是一个简单的数字,也可以是带有签名的函数 The alpha blending value of this layer on the day side of the globe, from 0.0 to 1.0. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数会传递当前帧状态、该图层以及需要 alpha 的图像图块的 x、y 和级别坐标,并且预计会返回用于该图块的 alpha 值。这仅在以下情况下生效 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the alpha is required, and it is expected to return the alpha value to use for the tile. This only takes effect when enableLighting is true. |
brightness |
number | function |
<可选> <optional> |
1.0 | 该层的亮度。 1.0 使用未修改的图像颜色。小于 1.0 会使图像变暗,而大于 1.0 会使图像变亮。这可以是一个简单的数字,也可以是带有签名的函数 The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 makes the imagery darker while greater than 1.0 makes it brighter. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数传递当前帧状态、该层以及需要亮度的图像图块的 x、y 和级别坐标,并且预计返回用于该图块的亮度值。该函数针对每一帧和每个图块执行,因此它必须很快。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the brightness is required, and it is expected to return the brightness value to use for the tile. The function is executed for every frame and for every tile, so it must be fast. |
contrast |
number | function |
<可选> <optional> |
1.0 | 该层的对比度。 1.0 使用未修改的图像颜色。小于 1.0 会降低对比度,而大于 1.0 则会增加对比度。这可以是一个简单的数字,也可以是带有签名的函数 The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the contrast while greater than 1.0 increases it. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数会传递当前帧状态、该图层以及需要对比度的图像图块的 x、y 和级别坐标,并且预计会返回用于该图块的对比度值。该函数针对每一帧和每个图块执行,因此它必须很快。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the contrast is required, and it is expected to return the contrast value to use for the tile. The function is executed for every frame and for every tile, so it must be fast. |
hue |
number | function |
<可选> <optional> |
0.0 | 该层的色调。 0.0 使用未修改的图像颜色。这可以是一个简单的数字,也可以是带有签名的函数 The hue of this layer. 0.0 uses the unmodified imagery color. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数会传递当前帧状态、该图层以及需要色调的图像图块的 x、y 和级别坐标,并且预计会返回用于该图块的色调值。该函数针对每一帧和每个图块执行,因此它必须很快。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the hue is required, and it is expected to return the hue value to use for the tile. The function is executed for every frame and for every tile, so it must be fast. |
saturation |
number | function |
<可选> <optional> |
1.0 | 该层的饱和度。 1.0 使用未修改的图像颜色。小于 1.0 会降低饱和度,而大于 1.0 则会增加饱和度。这可以是一个简单的数字,也可以是带有签名的函数 The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the saturation while greater than 1.0 increases it. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数传递当前帧状态、该层以及需要饱和度的图像图块的 x、y 和级别坐标,并且预计返回用于该图块的饱和度值。该函数针对每一帧和每个图块执行,因此它必须很快。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the saturation is required, and it is expected to return the saturation value to use for the tile. The function is executed for every frame and for every tile, so it must be fast. |
gamma |
number | function |
<可选> <optional> |
1.0 | 应用于该层的伽玛校正。 1.0 使用未修改的图像颜色。这可以是一个简单的数字,也可以是带有签名的函数 The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color. This can either be a simple number or a function with the signature
function(frameState, layer, x, y, level)。该函数传递当前帧状态、该层以及需要伽玛的图像图块的 x、y 和级别坐标,并且预计返回用于该图块的伽玛值。该函数针对每一帧和每个图块执行,因此它必须很快。 . The function is passed the current frame state, this layer, and the x, y, and level coordinates of the imagery tile for which the gamma is required, and it is expected to return the gamma value to use for the tile. The function is executed for every frame and for every tile, so it must be fast. |
splitDirection |
SplitDirection | function |
<可选> <optional> |
SplitDirection.NONE | The SplitDirection 分割以应用于该层。 split to apply to this layer. |
minificationFilter |
TextureMinificationFilter |
<可选> <optional> |
TextureMinificationFilter.LINEAR | 应用到该层的纹理缩小过滤器。可能的值为 The texture minification filter to apply to this layer. Possible values are TextureMinificationFilter.LINEAR and
TextureMinificationFilter.NEAREST. |
magnificationFilter |
TextureMagnificationFilter |
<可选> <optional> |
TextureMagnificationFilter.LINEAR | 应用到该层的纹理缩小过滤器。可能的值为 The texture minification filter to apply to this layer. Possible values are TextureMagnificationFilter.LINEAR and
TextureMagnificationFilter.NEAREST. |
show |
boolean |
<可选> <optional> |
true | 如果显示图层则为 True;否则为假。 True if the layer is shown; otherwise, false. |
maximumAnisotropy |
number |
<可选> <optional> |
最大支持 maximum supported | 用于纹理过滤的最大各向异性级别。如果未指定此参数,将使用 WebGL 堆栈支持的最大各向异性。值越大,图像在地平线视图中看起来越好。 The maximum anisotropy level to use for texture filtering. If this parameter is not specified, the maximum anisotropy supported by the WebGL stack will be used. Larger values make the imagery look better in horizon views. |
minimumTerrainLevel |
number |
<可选> <optional> |
显示此图像图层的最小地形细节级别,或未定义以在所有级别显示它。零级是最不详细的级别。 The minimum terrain level-of-detail at which to show this imagery layer, or undefined to show it at all levels. Level zero is the least-detailed level. | |
maximumTerrainLevel |
number |
<可选> <optional> |
显示此图像图层的最大地形细节级别,或未定义以在所有级别显示它。零级是最不详细的级别。 The maximum terrain level-of-detail at which to show this imagery layer, or undefined to show it at all levels. Level zero is the least-detailed level. | |
cutoutRectangle |
Rectangle |
<可选> <optional> |
用于剪切此 ImageryLayer 的一部分的制图矩形。 Cartographic rectangle for cutting out a portion of this ImageryLayer. | |
colorToAlpha |
Color |
<可选> <optional> |
用作 Alpha 的颜色。 Color to be used as alpha. | |
colorToAlphaThreshold |
number |
<可选> <optional> |
0.004 | 颜色到 Alpha 的阈值。 Threshold for color-to-alpha. |
发生错误时调用的函数。 A function that is called when an error occurs.
this: This:
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
err |
Error | 保存有关所发生错误的详细信息的对象。 An object holding details about the error that occurred. |
创建提供者时调用的函数 A function that is called when the provider has been created
this: This:
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
provider |
ImageryProvider | 创建的图像提供者。 The created imagery provider. |
ImageryLayer.fromWorldImagery 的初始化选项 Initialization options for ImageryLayer.fromWorldImagery
属性: Properties:
| 名称 Name | 类型 Type | Attributes | 默认值 Default | 说明 Description |
|---|---|---|---|---|
options.style |
IonWorldImageryStyle |
<可选> <optional> |
IonWorldImageryStyle | 基础影像的样式,目前仅支持 AERIAL、AERIAL_WITH_LABELS 和 ROAD。 The style of base imagery, only AERIAL, AERIAL_WITH_LABELS, and ROAD are currently supported. |
