一个提供 OpenStreetMap 托管的平板图像的图像提供者
或提供 Slippy 瓷砖。 默认url 连接到 OpenStreetMap 的志愿者运行
服务器,所以您必须遵循其
Tile Usage Policy.
| Name | Type | Description |
|---|---|---|
options |
OpenStreetMapImageryProvider.ConstructorOptions | 描述初始化选项的对象 |
Throws:
-
DeveloperError : The rectangle and minimumLevel indicate that there are more than four tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.
Example:
const osm = new Cesium.OpenStreetMapImageryProvider({
url : 'https://tile.openstreetmap.org/'
});
See:
Extends
Members
readonly credit : Credit
当图像提供者活动时, 获得信用值以显示 。 通常,这是用来信用的
图像的来源.
- Inherited From:
- Default Value:
undefined
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:
获得一个表示图像提供者是否提供的图像的值
包括一个α通道。 如果这个属性是虚假的, 一个 alpha 通道, 如果存在, 将会
将被忽略。 如果此属性属实, 任何没有 alpha 通道的图像都会被处理
好像他们的α是1.0 到处都是。 当此属性为虚假时, 内存使用
并缩短纹理上传时间.
- Inherited From:
- Default Value:
true
获得可以请求的最多详细级别,或者在没有限制的情况下未定义.
- Inherited From:
- Default Value:
undefined
获取可以请求的最小详细级别.
- Inherited From:
- Default Value:
0
获得 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 theGetFeatureInfoFormat.
- 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
获得每个瓦片的高度,以像素为单位.
- Inherited From:
- Default Value:
256
获得每个瓦片的宽度,以像素为单位.
- Inherited From:
- Default Value:
256
readonly tilingScheme : TilingScheme
获得此提供者使用的平板方案 .
- Inherited From:
- Default Value:
new WebMercatorTilingScheme()
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:
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
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
OpenStreetMapImagery 创建器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
url |
string |
<optional> |
'https://tile.openstreetmap.org' | The OpenStreetMap server url. |
fileExtension |
string |
<optional> |
'png' | The file extension for images on the server. |
retinaTiles |
boolean |
<optional> |
false | When true, request tiles at the 2x resolution for retina displays. |
rectangle |
Rectangle |
<optional> |
Rectangle.MAX_VALUE | The rectangle of the layer. |
minimumLevel |
number |
<optional> |
0 | The minimum level-of-detail supported by the imagery provider. |
maximumLevel |
number |
<optional> |
图像提供者支持的最大详细水平,或者在没有限制的情况下未定义. | |
ellipsoid |
Ellipsoid |
<optional> |
椭圆形. 如果未指定,则使用 NT 0 椭圆形. | |
credit |
Credit | string |
<optional> |
'MapQuest,Open Street地图和贡献者,CC-BY-SA' | 数据源的信用,在画布上显示. |