提供由 Web Map 服务( WMS ) 服务器托管的平板图像 .
| Name | Type | Description |
|---|---|---|
options |
WebMapServiceImageryProvider.ConstructorOptions | 描述初始化选项的对象 |
Example:
// WMS servers operated by the US government https://apps.nationalmap.gov/services/
const provider = new Cesium.WebMapServiceImageryProvider({
url : 'https://basemap.nationalmap.gov:443/arcgis/services/USGSHydroCached/MapServer/WMSServer',
layers : '0',
proxy: new Cesium.DefaultProxy('/proxy/')
});
const imageryLayer = new Cesium.ImageryLayer(provider);
viewer.imageryLayers.add(imageryLayer);
See:
Members
包含在 NT 0 NT 1 中的默认参数以获取图像. 数值如下:
service=WMS
version=1.1.1
request=GetMap
styles=
format=image/jpeg
包含在 NT 0 NT 1 中的默认参数以获取特性信息. 数值如下:
service=WMS
version=1.1.1
request=GetFeatureInfo
clock : Clock
获取或设置用于保留时间动态参数所用时间的时钟.
readonly credit : Credit
当图像提供者活动时, 获得信用值以显示 。 通常,这是用来信用的
图像的来源.
Gets or sets a value indicating whether feature picking is enabled. If true,
WebMapServiceImageryProvider#pickFeatures will
引用 GetFeatureInfo 服务于 WMS 服务器,并尝试解释响应中包含的功能. 如果说错了,
WebMapServiceImageryProvider#pickFeatures will immediately return undefined (indicating no pickable
特性),不与服务器通信. 如果您知道您的数据, 请将此属性设定为虚假
来源不支持选择特性, 或者如果您不希望此提供者的特性可以选择 .
-
Default Value:
true
readonly errorEvent : Event
获得一个在图像提供者遇到同步错误时上升的事件 。 通过签名
对事件,您将被通知错误,并有可能从中恢复。 活动听众
are passed an instance of
TileProviderError.
readonly getFeatureInfoUrl : Resource|string
获得 NT 0 服务器的 FeatureInfo NT 1 .
获得一个表示图像提供者是否提供的图像的值
包括一个α通道。 如果这个属性是虚假的, 一个 alpha 通道, 如果存在, 将会
将被忽略。 如果此属性属实, 任何没有 alpha 通道的图像都会被处理
好像他们的α是1.0 到处都是。 当此属性为虚假时, 内存使用
并缩短纹理上传时间.
获得以逗号分隔的 NT 0 层的名称.
获取可以请求的最多详细级别.
获取可以请求的最小详细级别.
readonly proxy : Proxy
获取此提供者使用的代理 .
readonly rectangle : Rectangle
用弧度表示这个例子提供的图像的矩形.
readonly tileDiscardPolicy : TileDiscardPolicy
获取瓷砖丢弃策略 。 如果未定义, 丢弃策略负责
用于通过它应当的DiscardImage函数过滤出“缺少”牌。 如果此函数
返回未定义,不过滤牌.
获得每个瓦片的高度,以像素为单位.
获得每个瓦片的宽度,以像素为单位.
readonly tilingScheme : TilingScheme
获得此提供者使用的平板方案 .
times : TimeIntervalCollection
获取或设置用于获取时间动态参数的时间间隔集合. 数据
TimeInterval 是一个包含在
tile requests.
获取 WMS 服务器的 URL .
Methods
getTileCredits(x, y, level) → Array.<Credit>
获得在显示特定瓦片时显示的信用值.
| Name | Type | Description |
|---|---|---|
x |
number | 瓷砖X坐标. |
y |
number | 瓦片Y坐标. |
level |
number | 瓦片级; |
Returns:
显示瓷砖时要显示的信用值 .
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
实例。 如果在指定位置找不到任何特性, 阵列可能为空 .
requestImage(x, y, level, request) → Promise.<ImageryTypes>|undefined
请求给定的瓦片的图像 .
| Name | Type | Description |
|---|---|---|
x |
number | 瓷砖X坐标. |
y |
number | 瓦片Y坐标. |
level |
number | 瓦片级. |
request |
Request | optional 请求对象 。 仅供内部使用. |
Returns:
承诺在图像可用时解决图像,或
如果服务器的主动请求过多, 未定义, 请求应在稍后重审 .
Type Definitions
WebMapServiceImagery 创建器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
url |
Resource | string | The URL of the WMS service. The URL supports the same keywords as the UrlTemplateImageryProvider. |
||
layers |
string | 要包含的层,用逗号分隔. | ||
parameters |
object |
<optional> |
WebMapServiceImageryProvider.DefaultParameters | Additional parameters to pass to the WMS server in the GetMap URL. |
getFeatureInfoParameters |
object |
<optional> |
WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters | Additional parameters to pass to the WMS server in the GetFeatureInfo URL. |
enablePickFeatures |
boolean |
<optional> |
true | If true, WebMapServiceImageryProvider#pickFeatures will invoke
getFeatureInfo在 NT 0 服务器上的操作,并返回响应中包含的特性. 如果说错了,
WebMapServiceImageryProvider#pickFeatures will immediately return undefined (indicating no pickable features)
without communicating with the server. Set this property to false if you know your WMS server does not support
GetFeatureInfo 或者如果你不想让这家供应商的特性成为可采的. 请注意,这可以是动态的
通过修改 WebMapServiceImagery Provider#enable PickFeatures 属性而压倒. |
getFeatureInfoFormats |
Array.<GetFeatureInfoFormat> |
<optional> |
WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats | The formats 在其中尝试 NT 0 GetFeatureInfo请求. |
rectangle |
Rectangle |
<optional> |
Rectangle.MAX_VALUE | The rectangle of the layer. |
tilingScheme |
TilingScheme |
<optional> |
new GeographicTilingScheme() | The tiling scheme to use to divide the world into tiles. |
ellipsoid |
Ellipsoid |
<optional> |
椭圆形. 如果指定了铺设方案, 此参数被忽略, 并使用平面图的椭圆形 。 如果没有 参数指定,使用 NT 0 椭圆. | |
tileWidth |
number |
<optional> |
256 | 每个瓦片的宽度以像素表示. |
tileHeight |
number |
<optional> |
256 | 每个瓦片的高度以像素表示. |
minimumLevel |
number |
<optional> |
0 | The minimum level-of-detail supported by the imagery provider. Take care when 指定最低水平的瓦片数量很小,例如4块或以下。 一个更大的数字是 可能会造成问题. |
maximumLevel |
number |
<optional> |
图像提供者支持的最大详细水平,或者在没有限制的情况下未定义. 如果没有具体说明,则无限制. | |
crs |
string |
<optional> |
CRS 规格,使用单位为 WMS 规格~1.3.0. | |
srs |
string |
<optional> |
SRS 规格,用于 WMS 规格 1.1.0或1.1.1 | |
credit |
Credit | string |
<optional> |
数据源的信用,在画布上显示. | |
subdomains |
string | Array.<string> |
<optional> |
'abc' | The subdomains to use for the {s} placeholder in the URL template.
如果这个参数是单字符串,字符串中的每个字符都是子域. 如果是的话
一个数组,数组中的每个元素都是子域. |
clock |
Clock |
<optional> |
A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified. | |
times |
TimeIntervalCollection |
<optional> |
TimeInterval Collection,其数据属性为包含时间动态维度及其值的对象. | |
getFeatureInfoUrl |
Resource | string |
<optional> |
腾讯网 腾讯网 腾讯网 腾讯网 腾讯网 腾讯网 腾讯网 腾讯网 腾讯网 腾讯网. 如果财产没有定义,那么我们使用url的财产值. |