new Cesium.TileMapServiceImageryProvider(options)

To construct a TileMapServiceImageryProvider, call TileMapServiceImageryProvider.fromUrl. Do not call the constructor directly.
提供由下列来源生成的平板图像的图像提供者: MapTiler, GDAL2Tiles, etc.
Name Type Description
options TileMapServiceImageryProvider.ConstructorOptions optional 描述初始化选项的对象
Example:
const tms = await Cesium.TileMapServiceImageryProvider.fromUrl(
   "../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

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

enablePickFeatures : boolean

Gets or sets a value indicating whether feature picking is enabled. If true, UrlTemplateImageryProvider#pickFeatures will ,并试图解释答复中包含的特性。 如果说错了, UrlTemplateImageryProvider#pickFeatures will immediately return undefined (indicating no pickable 特性),不与服务器通信. 如果您知道您的数据, 请将此属性设定为虚假 来源不支持选择特性, 或者如果您不希望此提供者的特性可以选择 .
Inherited From:
Default Value: true

readonly errorEvent : Event

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

readonly hasAlphaChannel : boolean

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

readonly maximumLevel : number|undefined

获得可以请求的最多详细级别,或者在没有限制的情况下未定义.
Inherited From:
Default Value: undefined

readonly minimumLevel : number

获取可以请求的最小详细级别.
Inherited From:
Default Value: 0

readonly pickFeaturesUrl : string

获得 NT 0 模板用于选择特性. 如果不指明此财产, UrlTemplateImageryProvider#pickFeatures will immediately return undefined, indicating no features picked. The URL template supports all of the keywords supported by the UrlTemplateImageryProvider#url property, plus the following:
  • {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 the GetFeatureInfoFormat.
Inherited From:

readonly proxy : Proxy

获取此提供者使用的代理 .
Inherited From:
Default Value: undefined

readonly rectangle : Rectangle

用弧度表示这个例子提供的图像的矩形.
Inherited From:
Default Value: tilingScheme.rectangle

readonly tileDiscardPolicy : TileDiscardPolicy

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

readonly tileHeight : number

获得每个瓦片的高度,以像素为单位.
Inherited From:
Default Value: 256

readonly tileWidth : number

获得每个瓦片的宽度,以像素为单位.
Inherited From:
Default Value: 256

readonly tilingScheme : TilingScheme

获得此提供者使用的平板方案 .
Inherited From:
Default Value: new WebMercatorTilingScheme()

readonly url : string

Gets the URL template to use to request tiles. It has the following keywords:
  • {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:

readonly urlSchemeZeroPadding : object

Gets the URL scheme zero padding for each tile coordinate. The format is '000' where each coordinate will be padded on the left with zeros to match the width of the passed string of zeros. e.g. Setting: urlSchemeZeroPadding : { '{x}' : '0000'} will cause an 'x' value of 12 to return the string '0012' for {x} in the generated URL. 其关键词如下:
  • {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

static Cesium.TileMapServiceImageryProvider.fromUrl(url, options)Promise.<TileMapServiceImageryProvider>

从指定的 URL 创建 TileMapServiceImagery 程序.
Name Type Description
url Resource | string 服务器上的图像牌路径 .
options TileMapServiceImageryProvider.ConstructorOptions optional 描述初始化选项的对象 .
Returns:
向创建的 TileMapServiceImagery 提供解答的承诺 .
Throws:
  • RuntimeError : Unable to find expected tilesets or bbox attributes in tilemapresource.xml
  • RuntimeError : tilemapresource.xml specifies an unsupported profile attribute
Example:
const tms = await Cesium.TileMapServiceImageryProvider.fromUrl(
   '../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))
});

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

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

pickFeatures(x, y, level, longitude, latitude)Promise.<Array.<ImageryLayerFeatureInfo>>|undefined

Asynchronously determines what features, if any, are located at a given longitude and latitude within a tile.
Name Type Description
x number 瓷砖X坐标.
y number 瓦片Y坐标.
level number 瓦片级.
longitude number 选择特征的经度 .
latitude number 选择特征的纬度.
Returns:
承诺在同步时解决 picking completes. The resolved value is an array of ImageryLayerFeatureInfo 实例。 如果在指定位置找不到任何特性, 阵列可能为空 . 如果不支持采摘,它也可能没有定义.
Inherited From:

requestImage(x, y, level, request)Promise.<ImageryTypes>|undefined

Name Type Description
x number 瓷砖X坐标.
y number 瓦片Y坐标.
level number 瓦片级.
request Request optional 请求对象 。 仅供内部使用.
Returns:
承诺在图像可用时解决图像,或 如果服务器的主动请求过多, 未定义, 请求应在稍后重审 .
Inherited From:

Type Definitions

Cesium.TileMapServiceImageryProvider.ConstructorOptions

TileMapServiceImagery 创建器的初始化选项
Properties:
Name Type Attributes Default Description
fileExtension string <optional>
'png' The file extension for images on the server.
credit Credit | string <optional>
'' 数据源的信用,在画布上显示.
minimumLevel number <optional>
0 The minimum level-of-detail supported by the imagery provider. Take care when specifying 表示最低水平的瓦片数量很小,例如四块或四块以下。 数量可能更多 导致产生问题.
maximumLevel number <optional>
图像提供者支持的最大详细水平,或者在没有限制的情况下未定义.
rectangle Rectangle <optional>
Rectangle.MAX_VALUE The rectangle, in radians, covered by the image.
tilingScheme TilingScheme <optional>
说明椭圆的平板方案 surface is broken into tiles. If this parameter is not provided, a WebMercatorTilingScheme is used.
ellipsoid Ellipsoid <optional>
椭圆形. 如果指定了铺设方案, 此参数被忽略, 并使用平面图的椭圆形 。 如果没有 参数指定,使用 NT 0 椭圆.
tileWidth number <optional>
256
tileHeight number <optional>
256
flipXY boolean <optional>
旧版本的 NT 0 在 NT 1 中翻转X和Y值.
tileDiscardPolicy TileDiscardPolicy <optional>
根据一些标准丢弃瓦片图像的政策 指定此选项将同样进行, 允许装入这些不正确的牌片 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.