提供由生成的平铺图像的图像提供程序
MapTiler、GDAL2Tiles等。
Name | Type | Description |
---|---|---|
options |
TileMapServiceImageryProvider.ConstructorOptions | 描述初始化选项的对象 |
Example:
var tms = new Cesium.TileMapServiceImageryProvider({
url : '../images/cesium_maptiler/Cesium_Logo_Color',
fileExtension: 'png',
maximumLevel: 4,
rectangle: new Cesium.Rectangle(
Cesium.Math.toRadians(-120.0),
Cesium.Math.toRadians(20.0),
Cesium.Math.toRadians(-60.0),
Cesium.Math.toRadians(40.0))
});
See:
Extends
Members
readonly credit : Credit
获取此图像提供程序处于活动状态时显示的点数。通常这是用来信用的
图像的来源。在
UrlTemplateImageryProvider#ready
返回true之前,不应调用此函数。- Inherited From:
- Default Value:
undefined
此提供程序的默认alpha混合值,0.0表示完全透明和
1.0表示完全不透明。
- Inherited From:
- Default Value:
undefined
此提供程序的默认亮度。1.0使用未修改的图像颜色。小于1.0
使图像变暗,大于1.0将使图像更亮。
- Inherited From:
- Default Value:
undefined
此提供程序的默认对比度。1.0使用未修改的图像颜色。小于1.0减少
大于1.0时,对比度会增加。
- Inherited From:
- Default Value:
undefined
默认的alpha混合值,在这个提供程序的全局日侧,0.0表示完全透明和
1.0表示完全不透明。
- Inherited From:
- Default Value:
undefined
要应用于此提供程序的默认gamma校正。1.0使用未修改的图像颜色。
- Inherited From:
- Default Value:
undefined
此提供程序的默认色调(以弧度为单位)。0.0使用未修改的图像颜色。
- Inherited From:
- Default Value:
undefined
defaultMagnificationFilter : TextureMagnificationFilter
要应用于此提供程序的默认纹理放大过滤器。
- Inherited From:
- Default Value:
undefined
defaultMinificationFilter : TextureMinificationFilter
要应用于此提供程序的默认纹理缩小筛选器。
- Inherited From:
- Default Value:
undefined
默认的alpha混合值出现在这个提供者的地球仪的夜间,0.0表示完全透明
1.0表示完全不透明。
- Inherited From:
- Default Value:
undefined
此提供程序的默认饱和度。1.0使用未修改的图像颜色。小于1
大于1.0时的饱和度会增加。
- Inherited From:
- Default Value:
undefined
获取或设置一个值,该值指示是否启用功能选取。如果为真,
UrlTemplateImageryProvider#pickFeatures
将
请求options.pickFeaturesUrl
并尝试解释响应中包含的功能。如果是假的,
UrlTemplateImageryProvider#pickFeatures
将立即返回未定义(表示不可拾取
功能)而不与服务器通信。如果知道数据,请将此属性设置为false
源不支持拾取功能,或者您不希望此提供程序的功能可拾取。- Inherited From:
- Default Value:
true
readonly errorEvent : Event
获取在映像提供程序遇到异步错误时引发的事件。通过订阅
对于事件,您将收到错误通知,并可能从中恢复。事件侦听器
传递给
TileProviderError
的实例。- Inherited From:
获取一个值,该值指示此图像提供程序是否提供图像
包括一个alpha通道。如果此属性为false,则alpha通道(如果存在)将
被忽视。如果此属性为true,则将处理没有alpha通道的任何图像
好像他们的alpha到处都是1.0。当此属性为false时,内存使用率
减少了纹理上传时间。这个功能应该
在
ImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
true
获取可以请求的最大详细级别,如果没有限制,则为未定义的详细级别。
在
UrlTemplateImageryProvider#ready
返回true之前,不应调用此函数。- Inherited From:
- Default Value:
undefined
获取可请求的最低详细级别。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
0
获取用于选择功能的URL模板。如果未指定此属性,
UrlTemplateImageryProvider#pickFeatures
将立即返回undefined,表示否
选择的功能。URL模板支持
UrlTemplateImageryProvider#url
房产,加上以下各项:
{i}
: The pixel column (horizontal coordinate) of the picked position, where the Westernmost pixel is 0.{j}
: The pixel row (vertical coordinate) of the picked position, where the Northernmost pixel is 0.{reverseI}
: The pixel column (horizontal coordinate) of the picked position, where the Easternmost pixel is 0.{reverseJ}
: The pixel row (vertical coordinate) of the picked position, where the Southernmost pixel is 0.{longitudeDegrees}
: The longitude of the picked position in degrees.{latitudeDegrees}
: The latitude of the picked position in degrees.{longitudeProjected}
: The longitude of the picked position in the projected coordinates of the tiling scheme.{latitudeProjected}
: The latitude of the picked position in the projected coordinates of the tiling scheme.{format}
: The format in which to get feature information, as specified in theGetFeatureInfoFormat
.
- Inherited From:
readonly proxy : Proxy
获取此提供程序使用的代理。
- Inherited From:
- Default Value:
undefined
获取一个值,该值指示提供程序是否可以使用。
- Inherited From:
获取在提供程序准备好使用时解析为true的承诺。
- Inherited From:
readonly rectangle : Rectangle
获取此实例提供的图像的矩形(以弧度为单位)。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
tilingScheme.rectangle
readonly tileDiscardPolicy : TileDiscardPolicy
获取磁贴丢弃策略。如果不是未定义,则由丢弃策略负责
用于通过其shouldDiscardImage函数过滤掉“丢失”的瓷砖。如果这个函数
返回未定义的,不过滤分片。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
undefined
获取每个平铺的高度(以像素为单位)。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
256
获取每个平铺的宽度(以像素为单位)。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
256
readonly tilingScheme : TilingScheme
获取此提供程序使用的平铺方案。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。- Inherited From:
- Default Value:
new WebMercatorTilingScheme()
获取用于请求平铺的URL模板。它有以下关键字:
-
{z}
: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid. -
{x}
: The tile X coordinate in the tiling scheme, where 0 is the Westernmost tile. -
{y}
: The tile Y coordinate in the tiling scheme, where 0 is the Northernmost tile. -
{s}
: One of the available subdomains, used to overcome browser limits on the number of simultaneous requests per host. -
{reverseX}
: The tile X coordinate in the tiling scheme, where 0 is the Easternmost tile. -
{reverseY}
: The tile Y coordinate in the tiling scheme, where 0 is the Southernmost tile. -
{reverseZ}
: The level of the tile in the tiling scheme, where level zero is the maximum level of the quadtree pyramid. In order to use reverseZ, maximumLevel must be defined. -
{westDegrees}
: The Western edge of the tile in geodetic degrees. -
{southDegrees}
: The Southern edge of the tile in geodetic degrees. -
{eastDegrees}
: The Eastern edge of the tile in geodetic degrees. -
{northDegrees}
: The Northern edge of the tile in geodetic degrees. -
{westProjected}
: The Western edge of the tile in projected coordinates of the tiling scheme. -
{southProjected}
: The Southern edge of the tile in projected coordinates of the tiling scheme. -
{eastProjected}
: The Eastern edge of the tile in projected coordinates of the tiling scheme. -
{northProjected}
: The Northern edge of the tile in projected coordinates of the tiling scheme. -
{width}
: The width of each tile in pixels. -
{height}
: The height of each tile in pixels.
- Inherited From:
获取每个平铺坐标的URL方案零填充。格式为'000',其中每个坐标将被填充
带零的左边与传递的零字符串的宽度相匹配。e、 g.设置:
urlSchemeZeroPadding:{x}':'0000'}
将导致值为12的“x”返回生成的URL中{x}的字符串“0012”。
它有以下关键字:
-
{z}
: The zero padding for the level of the tile in the tiling scheme. -
{x}
: The zero padding for the tile X coordinate in the tiling scheme. -
{y}
: The zero padding for the the tile Y coordinate in the tiling scheme. -
{reverseX}
: The zero padding for the tile reverseX coordinate in the tiling scheme. -
{reverseY}
: The zero padding for the tile reverseY coordinate in the tiling scheme. -
{reverseZ}
: The zero padding for the reverseZ coordinate of the tile in the tiling scheme.
- Inherited From:
Methods
getTileCredits(x, y, level) → Array.<Credit>
获取显示给定磁贴时要显示的点数。
Name | Type | Description |
---|---|---|
x |
Number | 平铺X坐标。 |
y |
Number | 平铺Y坐标。 |
level |
Number | 瓷砖水平; |
Returns:
显示磁贴时要显示的学分。
Throws:
-
DeveloperError :
getTileCredits
在图像提供商准备就绪之前不得调用。
- Inherited From:
pickFeatures(x, y, level, longitude, latitude) → Promise.<Array.<ImageryLayerFeatureInfo>>|undefined
异步地确定哪些要素(如果有的话)位于给定的经度和纬度内
一块瓷砖。在
ImageryProvider#ready
返回true之前,不应调用此函数。Name | Type | Description |
---|---|---|
x |
Number | 平铺X坐标。 |
y |
Number | 平铺Y坐标。 |
level |
Number | 平铺层。 |
longitude |
Number | 选择要素的经度。 |
latitude |
Number | 选择要素的纬度。 |
Returns:
对于所选功能的承诺,将在异步
拣选完成。解析值是一个
ImageryLayerFeatureInfo
数组
实例。如果在给定位置找不到特征,则数组可能为空。
如果不支持拣选,也可能未定义。- Inherited From:
重新初始化此实例。支持重新初始化已在使用的实例,但不支持
建议使用,因为图像提供商提供的现有磁贴将不会更新。
Name | Type | Description |
---|---|---|
options |
Promise.<Object> | Object | 可以传递给UrlTemplateImageryProvider 构造函数的任何选项。 |
- Inherited From:
请求给定磁贴的图像。这个功能应该
在
UrlTemplateImageryProvider#ready
返回true之前不调用。Name | Type | Description |
---|---|---|
x |
Number | 平铺X坐标。 |
y |
Number | 平铺Y坐标。 |
level |
Number | 平铺层。 |
request |
Request | optional 请求对象。仅供内部使用。 |
Returns:
对映像的承诺,当映像可用时将解决该问题,或
如果对服务器的活动请求太多,则未定义
应该稍后重试。解析图像可以是
图像或画布DOM对象。
- Inherited From:
Type Definitions
TileMapServiceImageyProvider构造函数的初始化选项
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
Resource | String | Promise.<Resource> | Promise.<String> |
<optional> |
'.' | 服务器上图像平铺的路径。 |
fileExtension |
String |
<optional> |
'png' | 服务器上图像的文件扩展名。 |
credit |
Credit | String |
<optional> |
'' | 显示在画布上的数据源的贷方。 |
minimumLevel |
Number |
<optional> |
0 | 提供程序支持的图像的最低细节级别。指定时请小心 这意味着最小级别的瓷砖数量很小,例如4个或更少。可能会有更大的数字 导致渲染问题。 |
maximumLevel |
Number |
<optional> |
图像提供商支持的最大细节级别,如果没有限制,则未定义。 | |
rectangle |
Rectangle |
<optional> |
Rectangle.MAX_VALUE | 图像覆盖的矩形,以弧度表示。 |
tilingScheme |
TilingScheme |
<optional> |
平铺方案指定如何
表面碎成了瓦片。如果未提供此参数,则WebMercatorTilingScheme
被使用。 |
|
ellipsoid |
Ellipsoid |
<optional> |
椭球体。如果指定了平铺方案, 忽略此参数,而是使用平铺方案的椭球体。如果两者都不是 参数,则使用WGS84椭球体。 | |
tileWidth |
Number |
<optional> |
256 | 图像平铺的像素宽度。 |
tileHeight |
Number |
<optional> |
256 | 图像平铺的像素高度。 |
flipXY |
Boolean |
<optional> |
gdal2的旧版本平铺.py翻转X和Y值tileMasource.xml. 指定此选项将执行相同的操作,从而允许加载这些不正确的tileset。 |