new WebMapServiceImageryProvider()
Used to load map service classes that comply with WMS (Web Map Service) standards.
| Name | Type | Default | Description |
|---|---|---|---|
options.url |
String |
The URL of WMS service. This URL supports the same keywords as the URL Template ImageryProvider. |
|
options.layers |
String |
The layers to be included are separated by commas. |
|
options.parameters |
Object | WebMapServiceImageryProvider.DefaultParameters |
optional
Additional parameters passed to WMS server in GetMap URL. |
options.getFeatureInfoParameters |
Object | WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters |
optional
Additional parameters passed to the WMS server in the GetEigenInfo URL. |
options.enablePickFeatures |
Boolean | true |
optional
If true, WebMapServiceImageryProvider # pickFeatures will call the GetEigenInfo operation on the WMS server and return the features contained in the response. If false, WebMapServiceImageryProvider # pickFeatures will immediately return undefined (indicating no selectable features) without communicating with the server. If you know that your WMS server does not support GetEigenInfo, or if you do not want this provider's feature to be selectable, please set this property to false. Note that this can be dynamically overridden by modifying the WebMapServiceImageryProvider # enablePickFeatures property. |
options.getFeatureInfoFormats |
Array.<GetFeatureInfoFormat> | WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats |
optional
Attempt the format of WMS GetEigenInfo request. |
options.rectangle |
Rectangle | Rectangle.MAX_VALUE |
optional
The rectangle of the layer. |
options.tilingScheme |
TilingScheme | new GeographicTilingScheme() |
optional
A slicing scheme that divides geography into several blocks. |
options.ellipsoid |
Ellipsoid |
optional
Ellipsoid. If a slicing scheme is specified, ignore this parameter and use the ellipsoid of the slicing scheme. If no parameters are specified, use WGS84 ellipsoid. |
|
options.tileWidth |
Number | 256 |
optional
The width (in pixels) of each tile. |
options.tileHeight |
Number | 256 |
optional
The height (in pixels) of each tile. |
options.minimumLevel |
Number | 0 |
optional
The minimum level of detail supported by the image provider. When specifying, it should be noted that the minimum number of tiles should be small, such as four or less. If the quantity is large, it may cause rendering issues. |
options.maximumLevel |
Number |
optional
The maximum level of detail supported by the image provider; If there are no restrictions, then it is undefined. If not specified, there are no restrictions. |
|
options.credit |
Credit | String |
optional
The copyright statement of the data source is displayed on the canvas. |
|
options.proxy |
Object |
optional
Proxy used for requests. If necessary, the object should have a getURL function to return the proxy URL. |
|
options.subdomains |
String | Array.<String> | 'abc' |
optional
Used as a subdomain for the {s} placeholder in URL templates. If the parameter is a single string, then each character in the string is a subdomain. If it is an array, each element in the array is a subdomain. |
- See:
Example
var provider = new SuperMap3D.WebMapServiceImageryProvider({
url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
layers : '0',
proxy: new SuperMap3D.DefaultProxy('/proxy/')
});
viewer.imageryLayers.addImageryProvider(provider);
Members
-
(static, constant) DefaultParametersObject
-
The default parameters to include in the WMS URL to obtain images. The values are as follows: service=WMS version=1.1.1 request=GetMap styles= format=image/jpeg
-
readonly creditCredit
-
Obtain the copyright statement to be displayed when activating the image provider. Usually, this will be used to indicate the source of the image. This function should not be called before WebMapServiceImageryProvider # ready returns true.
-
customRequestHeadersObject
-
Custom request header
-
enablePickFeaturesBoolean
-
Gets or sets a value indicating whether feature selection is enabled. If true, WebMapServiceImageryProvider # pickFeatures will call the GetEigenInfo service on the WMS server and attempt to interpret the feature information contained in the response. If set to false, WebMapServiceImageryProvider # pickFeatures will immediately return undefined (indicating no selectable features) and will not communicate with the server. If you know that your data source does not support feature selection, or if you do not want the features provided by the program to be selectable, please set this property to false.
- Default Value: true
readonly errorEventEvent
Retrieve the event triggered when the image provider encounters an asynchronous error. By subscribing to this event, you will receive error notifications and may potentially recover from them. The event listener will receive an instance of TileProviderError.
readonly hasAlphaChannelBoolean
Obtain a value indicating whether the image provided by the image provider contains an alpha channel. If the attribute is false, the existing alpha channel will be ignored. If this attribute is true, any image that does not contain an alpha channel will be considered as an image with an alpha value of 1.0. When this attribute is false, both memory usage and texture upload time will be reduced.
readonly layersString
Get the names of WMS layers separated by commas.
readonly maximumLevelNumber
Obtain the maximum level of granularity that can be requested. This function should not be called until WebMapServiceImageryProvider # ready returns true.
readonly minimumLevelNumber
Obtain the minimum level of granularity that can be requested. This function should not be called until WebMapServiceImageryProvider # ready returns true.
readonly proxyProxy
Get the proxy used by the provider.
readonly readyBoolean
Get a value indicating whether the provider can use it.
readonly readyPromisePromise.<Boolean>
Get the Promise that parses to true when the provider is ready.
readonly rectangleRectangle
Obtain the rectangle (in radians) of the image provided by this instance. This function should not be called before WebMapServiceImageryProvider # ready returns true.
readonly tileDiscardPolicyTileDiscardPolicy
Obtain tile discard strategy. If not defined, the discard policy is responsible for filtering out "lost" tiles through its should DiscardImage function. If this function returns undefined, it will not filter any tiles. This function should not be called until WebMapServiceImageryProvider # ready returns true.
readonly tileHeightNumber
Get the height of each tile in pixels. This function should not be called before WebMapServiceImageryProvider # ready returns true.
readonly tileWidthNumber
Get the width of each tile in pixels. This function should not be called before WebMapServiceImageryProvider # ready returns true.
readonly tilingSchemeTilingScheme
Obtain the slicing scheme used by this provider. This function should not be called before WebMapServiceImageryProvider # ready returns true.
readonly urlString
Get the URL of the WMS server.
Methods
-
getTileCredits(x, y, level){Array.<Credit>}
-
Obtain the copyright statement to be displayed when displaying a given tile.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The Y coordinate of the tile.
levelNumber The level of tiles.
Throws:
-
GetTileCredits must not be called before the video provider is ready.
- Type
- DeveloperError
Returns:
Type Description Array.<Credit> The copyright statement required when displaying tiles. -
-
pickFeatures(x, y, level, longitude, latitude){Promise.<Array.<ImageryLayerFeatureInfo>>|undefined}
-
Asynchronous determination of the terrain features (if any) at the given longitude and latitude in the tile. This function should not be called before ImageryProvider # ready returns true.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The Y coordinate of the tile.
levelNumber The level of tiles.
longitudeNumber Select the longitude of the feature.
latitudeNumber Select the latitude of the feature.
Throws:
-
PickFeatures must not be called before the video provider is ready.
- Type
- DeveloperError
Returns:
Type Description Promise.<Array.<ImageryLayerFeatureInfo>> | undefined When asynchronous extraction is completed, the Promise of the extracted features will be parsed. The parsed value is an array composed of ImageryLayerElementInfo instances. If no features are found at a given location, the array may be empty. -
-
requestImage(x, y, level, request){Promise.<(Image|Canvas)>|undefined}
-
Request to specify the image of the tile. This function should not be called before WebMapServiceImageryProvider # ready returns true.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The Y coordinate of the tile.
levelNumber The level of tiles.
requestRequest optional Request object. For internal use only.
Throws:
-
RequestImage must not be called before the image provider is ready.
- Type
- DeveloperError
Returns:
Type Description Promise.<(Image|Canvas)> | undefined Promise of the image, which will parse the image when it is available; If there are too many active requests on the server, the Promise is not defined and the request should be retried later. The parsed image can be an image or a Canvas DOM object. -