提供来自 Azure 的 2D 图像瓦片。
| Name | Type | Description |
|---|---|---|
options |
Azure2DImageryProvider.ConstructorOptions | 描述初始化选项的对象。 |
Example:
// Azure 2D 影像提供器
const azureImageryProvider = new Cesium.Azure2DImageryProvider({
subscriptionKey: "subscription-key",
tilesetId: "microsoft.base.road"
});
Members
readonly credit : Credit
Gets the credit to display when this imagery provider is active. Typically this is used to credit
the source of the imagery.
获取该提供器使用的代理。
获取指示该影像提供器是否提供图像的布尔值。
are passed an instance of
TileProviderError.
Gets a value indicating whether or not the images provided by this imagery provider
包含 alpha 通道。如果此属性为 false,则存在的 alpha 通道将被忽略。
任何没有 alpha 通道的图像将被视为其 alpha 值为 1.0。当此属性为 true 时,内存使用和纹理上传时间都会减少。
获取在显示特定瓦片时应显示的致谢信息。
瓦片的 X 坐标。
获取可请求的最大细节级别。
获取可请求的最小细节级别。通常,
只有在影像的矩形区域足够小且最小级别的瓦片数量较少时,才应使用最小级别。如果
最小级别的瓦片数量过多,则会导致
渲染问题。
获取提供器使用的瓦片方案。
readonly proxy : Proxy
Gets the proxy used by this provider.
获取该实例提供的影像的弧度单位制矩形区域。
readonly tileDiscardPolicy : TileDiscardPolicy
获取影像提供器遇到异步错误时引发的事件。通过订阅该事件,您将收到错误通知并可能从中恢复。事件监听器
接收
TileProviderError 的实例。
获取此影像提供器激活时显示的信用信息。通常用于显示影像的来源。
获取每个瓦片的像素高度。
获取每个瓦片的像素宽度。
readonly tilingScheme : TilingScheme
获取瓦片丢弃策略。如果未定义为 undefined,该策略负责通过 shouldDiscardImage 函数过滤掉“缺失”的瓦片。如果该函数返回 undefined,则不会过滤任何瓦片。
获取 Azure 2D Imagery 服务器的 URL。
Methods
getTileCredits(x, y, level) → Array.<Credit>|undefined
瓦片的 Y 坐标。
| Name | Type | Description |
|---|---|---|
x |
number | 瓦片的级别。 |
y |
number | 瓦片的级别。 |
level |
number | 瓦片的层级。 |
Returns:
The 在显示瓦片时应显示的致谢信息。
此影像提供程序目前不支持选择特征,因此该函数直接返回 undefined。
undefined。
| Name | Type | Description |
|---|---|---|
x |
number | 瓦片的 X 坐标。 |
y |
number | 瓦片的 Y 坐标。 |
level |
number | 瓦片的层级。 |
longitude |
number | 选择特征的经度。 |
latitude |
number | 选择特征的纬度。 |
Returns:
Undefined 因为不支持选择功能。
requestImage(x, y, level, request) → Promise.<ImageryTypes>|undefined
获取指定瓦片的图像。
| Name | Type | Description |
|---|---|---|
x |
number | 瓦片的 X 坐标。 |
y |
number | 瓦片的 Y 坐标。 |
level |
number | 瓦片的层级。 |
request |
Request | optional 请求对象。仅用于内部使用。 |
Returns:
A 对图像的承诺,在图像可用时解析,或者
如果向服务器发送的请求过多且需要重试,则返回 undefined。
Type Definitions
Azure2DImageryProvider 构造器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
subscriptionKey |
string | 影像的公开订阅密钥。 | ||
url |
string |
<optional> |
"https://atlas.microsoft.com/" | Azure 服务器 URL。 |
tilesetId |
string |
<optional> |
"microsoft.imagery" | Azure tileset ID。有效的选项包括 microsoft.imagery、microsoft.base.road 和 microsoft.base.labels.road。 |
ellipsoid |
Ellipsoid |
<optional> |
Ellipsoid.default | 椭球体参数。如果未指定,则使用默认椭球体。 |
minimumLevel |
number |
<optional> |
0 | 影像提供器支持的最小细节级别。在指定时需注意 最小级别下的瓦片数量应较少,例如四片或更少。数量过多可能导致 渲染问题。 |
maximumLevel |
number |
<optional> |
22 | 影像提供器支持的最大细节级别。 |
rectangle |
Rectangle |
<optional> |
Rectangle.MAX_VALUE | 图像所覆盖的弧度单位制矩形区域。 |
