WebMapServiceImageryProvider.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. import defaultValue from '../Core/defaultValue.js';
  2. import defined from '../Core/defined.js';
  3. import defineProperties from '../Core/defineProperties.js';
  4. import DeveloperError from '../Core/DeveloperError.js';
  5. import freezeObject from '../Core/freezeObject.js';
  6. import GeographicTilingScheme from '../Core/GeographicTilingScheme.js';
  7. import Resource from '../Core/Resource.js';
  8. import WebMercatorProjection from '../Core/WebMercatorProjection.js';
  9. import GetFeatureInfoFormat from './GetFeatureInfoFormat.js';
  10. import TimeDynamicImagery from './TimeDynamicImagery.js';
  11. import UrlTemplateImageryProvider from './UrlTemplateImageryProvider.js';
  12. /**
  13. * Provides tiled imagery hosted by a Web Map Service (WMS) server.
  14. *
  15. * @alias WebMapServiceImageryProvider
  16. * @constructor
  17. *
  18. * @param {Object} options Object with the following properties:
  19. * @param {Resource|String} options.url The URL of the WMS service. The URL supports the same keywords as the {@link UrlTemplateImageryProvider}.
  20. * @param {String} options.layers The layers to include, separated by commas.
  21. * @param {Object} [options.parameters=WebMapServiceImageryProvider.DefaultParameters] Additional parameters to pass to the WMS server in the GetMap URL.
  22. * @param {Object} [options.getFeatureInfoParameters=WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
  23. * @param {Boolean} [options.enablePickFeatures=true] If true, {@link WebMapServiceImageryProvider#pickFeatures} will invoke
  24. * the GetFeatureInfo operation on the WMS server and return the features included in the response. If false,
  25. * {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable features)
  26. * without communicating with the server. Set this property to false if you know your WMS server does not support
  27. * GetFeatureInfo or if you don't want this provider's features to be pickable. Note that this can be dynamically
  28. * overridden by modifying the WebMapServiceImageryProvider#enablePickFeatures property.
  29. * @param {GetFeatureInfoFormat[]} [options.getFeatureInfoFormats=WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] The formats
  30. * in which to try WMS GetFeatureInfo requests.
  31. * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle of the layer.
  32. * @param {TilingScheme} [options.tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
  33. * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
  34. * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
  35. * parameter is specified, the WGS84 ellipsoid is used.
  36. * @param {Number} [options.tileWidth=256] The width of each tile in pixels.
  37. * @param {Number} [options.tileHeight=256] The height of each tile in pixels.
  38. * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when
  39. * specifying this that the number of tiles at the minimum level is small, such as four or less. A larger number is
  40. * likely to result in rendering problems.
  41. * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
  42. * If not specified, there is no limit.
  43. * @param {String} [options.crs] CRS specification, for use with WMS specification >= 1.3.0.
  44. * @param {String} [options.srs] SRS specification, for use with WMS specification 1.1.0 or 1.1.1
  45. * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
  46. * @param {String|String[]} [options.subdomains='abc'] The subdomains to use for the <code>{s}</code> placeholder in the URL template.
  47. * If this parameter is a single string, each character in the string is a subdomain. If it is
  48. * an array, each element in the array is a subdomain.
  49. * @param {Clock} [options.clock] A Clock instance that is used when determining the value for the time dimension. Required when options.times is specified.
  50. * @param {TimeIntervalCollection} [options.times] TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.
  51. *
  52. * @see ArcGisMapServerImageryProvider
  53. * @see BingMapsImageryProvider
  54. * @see GoogleEarthEnterpriseMapsProvider
  55. * @see OpenStreetMapImageryProvider
  56. * @see SingleTileImageryProvider
  57. * @see TileMapServiceImageryProvider
  58. * @see WebMapTileServiceImageryProvider
  59. * @see UrlTemplateImageryProvider
  60. *
  61. * @see {@link http://resources.esri.com/help/9.3/arcgisserver/apis/rest/|ArcGIS Server REST API}
  62. * @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
  63. *
  64. * @example
  65. * var provider = new Cesium.WebMapServiceImageryProvider({
  66. * url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
  67. * layers : '0',
  68. * proxy: new Cesium.DefaultProxy('/proxy/')
  69. * });
  70. *
  71. * viewer.imageryLayers.addImageryProvider(provider);
  72. */
  73. function WebMapServiceImageryProvider(options) {
  74. options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  75. //>>includeStart('debug', pragmas.debug);
  76. if (!defined(options.url)) {
  77. throw new DeveloperError('options.url is required.');
  78. }
  79. if (!defined(options.layers)) {
  80. throw new DeveloperError('options.layers is required.');
  81. }
  82. //>>includeEnd('debug');
  83. if (defined(options.times) && !defined(options.clock)) {
  84. throw new DeveloperError('options.times was specified, so options.clock is required.');
  85. }
  86. var resource = Resource.createIfNeeded(options.url);
  87. var pickFeatureResource = resource.clone();
  88. resource.setQueryParameters(WebMapServiceImageryProvider.DefaultParameters, true);
  89. pickFeatureResource.setQueryParameters(WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters, true);
  90. if (defined(options.parameters)) {
  91. resource.setQueryParameters(objectToLowercase(options.parameters));
  92. }
  93. if (defined(options.getFeatureInfoParameters)) {
  94. pickFeatureResource.setQueryParameters(objectToLowercase(options.getFeatureInfoParameters));
  95. }
  96. var that = this;
  97. this._reload = undefined;
  98. if (defined(options.times)) {
  99. this._timeDynamicImagery = new TimeDynamicImagery({
  100. clock : options.clock,
  101. times : options.times,
  102. requestImageFunction : function(x, y, level, request, interval) {
  103. return requestImage(that, x, y, level, request, interval);
  104. },
  105. reloadFunction : function() {
  106. if (defined(that._reload)) {
  107. that._reload();
  108. }
  109. }
  110. });
  111. }
  112. var parameters = {};
  113. parameters.layers = options.layers;
  114. parameters.bbox = '{westProjected},{southProjected},{eastProjected},{northProjected}';
  115. parameters.width = '{width}';
  116. parameters.height = '{height}';
  117. // Use SRS or CRS based on the WMS version.
  118. if (parseFloat(resource.queryParameters.version) >= 1.3) {
  119. // Use CRS with 1.3.0 and going forward.
  120. // For GeographicTilingScheme, use CRS:84 vice EPSG:4326 to specify lon, lat (x, y) ordering for
  121. // bbox requests.
  122. parameters.crs = defaultValue(options.crs, options.tilingScheme && options.tilingScheme.projection instanceof WebMercatorProjection ? 'EPSG:3857' : 'CRS:84');
  123. } else {
  124. // SRS for WMS 1.1.0 or 1.1.1.
  125. parameters.srs = defaultValue(options.srs, options.tilingScheme && options.tilingScheme.projection instanceof WebMercatorProjection ? 'EPSG:3857' : 'EPSG:4326');
  126. }
  127. resource.setQueryParameters(parameters, true);
  128. pickFeatureResource.setQueryParameters(parameters, true);
  129. var pickFeatureParams = {
  130. query_layers: options.layers,
  131. x: '{i}',
  132. y: '{j}',
  133. info_format: '{format}'
  134. };
  135. pickFeatureResource.setQueryParameters(pickFeatureParams, true);
  136. this._resource = resource;
  137. this._pickFeaturesResource = pickFeatureResource;
  138. this._layers = options.layers;
  139. // Let UrlTemplateImageryProvider do the actual URL building.
  140. this._tileProvider = new UrlTemplateImageryProvider({
  141. url : resource,
  142. pickFeaturesUrl : pickFeatureResource,
  143. tilingScheme : defaultValue(options.tilingScheme, new GeographicTilingScheme({ ellipsoid : options.ellipsoid})),
  144. rectangle : options.rectangle,
  145. tileWidth : options.tileWidth,
  146. tileHeight : options.tileHeight,
  147. minimumLevel : options.minimumLevel,
  148. maximumLevel : options.maximumLevel,
  149. subdomains: options.subdomains,
  150. tileDiscardPolicy : options.tileDiscardPolicy,
  151. credit : options.credit,
  152. getFeatureInfoFormats : defaultValue(options.getFeatureInfoFormats, WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats),
  153. enablePickFeatures: options.enablePickFeatures
  154. });
  155. }
  156. function requestImage(imageryProvider, col, row, level, request, interval) {
  157. var dynamicIntervalData = defined(interval) ? interval.data : undefined;
  158. var tileProvider = imageryProvider._tileProvider;
  159. if (defined(dynamicIntervalData)) {
  160. // We set the query parameters within the tile provider, because it is managing the query.
  161. tileProvider._resource.setQueryParameters(dynamicIntervalData);
  162. }
  163. return tileProvider.requestImage(col, row, level, request);
  164. }
  165. function pickFeatures(imageryProvider, x, y, level, longitude, latitude, interval) {
  166. var dynamicIntervalData = defined(interval) ? interval.data : undefined;
  167. var tileProvider = imageryProvider._tileProvider;
  168. if (defined(dynamicIntervalData)) {
  169. // We set the query parameters within the tile provider, because it is managing the query.
  170. tileProvider._pickFeaturesResource.setQueryParameters(dynamicIntervalData);
  171. }
  172. return tileProvider.pickFeatures(x, y, level, longitude, latitude);
  173. }
  174. defineProperties(WebMapServiceImageryProvider.prototype, {
  175. /**
  176. * Gets the URL of the WMS server.
  177. * @memberof WebMapServiceImageryProvider.prototype
  178. * @type {String}
  179. * @readonly
  180. */
  181. url : {
  182. get : function() {
  183. return this._resource._url;
  184. }
  185. },
  186. /**
  187. * Gets the proxy used by this provider.
  188. * @memberof WebMapServiceImageryProvider.prototype
  189. * @type {Proxy}
  190. * @readonly
  191. */
  192. proxy : {
  193. get : function() {
  194. return this._resource.proxy;
  195. }
  196. },
  197. /**
  198. * Gets the names of the WMS layers, separated by commas.
  199. * @memberof WebMapServiceImageryProvider.prototype
  200. * @type {String}
  201. * @readonly
  202. */
  203. layers : {
  204. get : function() {
  205. return this._layers;
  206. }
  207. },
  208. /**
  209. * Gets the width of each tile, in pixels. This function should
  210. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  211. * @memberof WebMapServiceImageryProvider.prototype
  212. * @type {Number}
  213. * @readonly
  214. */
  215. tileWidth : {
  216. get : function() {
  217. return this._tileProvider.tileWidth;
  218. }
  219. },
  220. /**
  221. * Gets the height of each tile, in pixels. This function should
  222. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  223. * @memberof WebMapServiceImageryProvider.prototype
  224. * @type {Number}
  225. * @readonly
  226. */
  227. tileHeight : {
  228. get : function() {
  229. return this._tileProvider.tileHeight;
  230. }
  231. },
  232. /**
  233. * Gets the maximum level-of-detail that can be requested. This function should
  234. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  235. * @memberof WebMapServiceImageryProvider.prototype
  236. * @type {Number}
  237. * @readonly
  238. */
  239. maximumLevel : {
  240. get : function() {
  241. return this._tileProvider.maximumLevel;
  242. }
  243. },
  244. /**
  245. * Gets the minimum level-of-detail that can be requested. This function should
  246. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  247. * @memberof WebMapServiceImageryProvider.prototype
  248. * @type {Number}
  249. * @readonly
  250. */
  251. minimumLevel : {
  252. get : function() {
  253. return this._tileProvider.minimumLevel;
  254. }
  255. },
  256. /**
  257. * Gets the tiling scheme used by this provider. This function should
  258. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  259. * @memberof WebMapServiceImageryProvider.prototype
  260. * @type {TilingScheme}
  261. * @readonly
  262. */
  263. tilingScheme : {
  264. get : function() {
  265. return this._tileProvider.tilingScheme;
  266. }
  267. },
  268. /**
  269. * Gets the rectangle, in radians, of the imagery provided by this instance. This function should
  270. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  271. * @memberof WebMapServiceImageryProvider.prototype
  272. * @type {Rectangle}
  273. * @readonly
  274. */
  275. rectangle : {
  276. get : function() {
  277. return this._tileProvider.rectangle;
  278. }
  279. },
  280. /**
  281. * Gets the tile discard policy. If not undefined, the discard policy is responsible
  282. * for filtering out "missing" tiles via its shouldDiscardImage function. If this function
  283. * returns undefined, no tiles are filtered. This function should
  284. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  285. * @memberof WebMapServiceImageryProvider.prototype
  286. * @type {TileDiscardPolicy}
  287. * @readonly
  288. */
  289. tileDiscardPolicy : {
  290. get : function() {
  291. return this._tileProvider.tileDiscardPolicy;
  292. }
  293. },
  294. /**
  295. * Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
  296. * to the event, you will be notified of the error and can potentially recover from it. Event listeners
  297. * are passed an instance of {@link TileProviderError}.
  298. * @memberof WebMapServiceImageryProvider.prototype
  299. * @type {Event}
  300. * @readonly
  301. */
  302. errorEvent : {
  303. get : function() {
  304. return this._tileProvider.errorEvent;
  305. }
  306. },
  307. /**
  308. * Gets a value indicating whether or not the provider is ready for use.
  309. * @memberof WebMapServiceImageryProvider.prototype
  310. * @type {Boolean}
  311. * @readonly
  312. */
  313. ready : {
  314. get : function() {
  315. return this._tileProvider.ready;
  316. }
  317. },
  318. /**
  319. * Gets a promise that resolves to true when the provider is ready for use.
  320. * @memberof WebMapServiceImageryProvider.prototype
  321. * @type {Promise.<Boolean>}
  322. * @readonly
  323. */
  324. readyPromise : {
  325. get : function() {
  326. return this._tileProvider.readyPromise;
  327. }
  328. },
  329. /**
  330. * Gets the credit to display when this imagery provider is active. Typically this is used to credit
  331. * the source of the imagery. This function should not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  332. * @memberof WebMapServiceImageryProvider.prototype
  333. * @type {Credit}
  334. * @readonly
  335. */
  336. credit : {
  337. get : function() {
  338. return this._tileProvider.credit;
  339. }
  340. },
  341. /**
  342. * Gets a value indicating whether or not the images provided by this imagery provider
  343. * include an alpha channel. If this property is false, an alpha channel, if present, will
  344. * be ignored. If this property is true, any images without an alpha channel will be treated
  345. * as if their alpha is 1.0 everywhere. When this property is false, memory usage
  346. * and texture upload time are reduced.
  347. * @memberof WebMapServiceImageryProvider.prototype
  348. * @type {Boolean}
  349. * @readonly
  350. */
  351. hasAlphaChannel : {
  352. get : function() {
  353. return this._tileProvider.hasAlphaChannel;
  354. }
  355. },
  356. /**
  357. * Gets or sets a value indicating whether feature picking is enabled. If true, {@link WebMapServiceImageryProvider#pickFeatures} will
  358. * invoke the <code>GetFeatureInfo</code> service on the WMS server and attempt to interpret the features included in the response. If false,
  359. * {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
  360. * features) without communicating with the server. Set this property to false if you know your data
  361. * source does not support picking features or if you don't want this provider's features to be pickable.
  362. * @memberof WebMapServiceImageryProvider.prototype
  363. * @type {Boolean}
  364. * @default true
  365. */
  366. enablePickFeatures : {
  367. get : function() {
  368. return this._tileProvider.enablePickFeatures;
  369. },
  370. set : function(enablePickFeatures) {
  371. this._tileProvider.enablePickFeatures = enablePickFeatures;
  372. }
  373. },
  374. /**
  375. * Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
  376. * @memberof WebMapServiceImageryProvider.prototype
  377. * @type {Clock}
  378. */
  379. clock : {
  380. get : function() {
  381. return this._timeDynamicImagery.clock;
  382. },
  383. set : function(value) {
  384. this._timeDynamicImagery.clock = value;
  385. }
  386. },
  387. /**
  388. * Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
  389. * TimeInterval is an object containing the keys and values of the properties that are used during
  390. * tile requests.
  391. * @memberof WebMapServiceImageryProvider.prototype
  392. * @type {TimeIntervalCollection}
  393. */
  394. times : {
  395. get : function() {
  396. return this._timeDynamicImagery.times;
  397. },
  398. set : function(value) {
  399. this._timeDynamicImagery.times = value;
  400. }
  401. }
  402. });
  403. /**
  404. * Gets the credits to be displayed when a given tile is displayed.
  405. *
  406. * @param {Number} x The tile X coordinate.
  407. * @param {Number} y The tile Y coordinate.
  408. * @param {Number} level The tile level;
  409. * @returns {Credit[]} The credits to be displayed when the tile is displayed.
  410. *
  411. * @exception {DeveloperError} <code>getTileCredits</code> must not be called before the imagery provider is ready.
  412. */
  413. WebMapServiceImageryProvider.prototype.getTileCredits = function(x, y, level) {
  414. return this._tileProvider.getTileCredits(x, y, level);
  415. };
  416. /**
  417. * Requests the image for a given tile. This function should
  418. * not be called before {@link WebMapServiceImageryProvider#ready} returns true.
  419. *
  420. * @param {Number} x The tile X coordinate.
  421. * @param {Number} y The tile Y coordinate.
  422. * @param {Number} level The tile level.
  423. * @param {Request} [request] The request object. Intended for internal use only.
  424. * @returns {Promise.<Image|Canvas>|undefined} A promise for the image that will resolve when the image is available, or
  425. * undefined if there are too many active requests to the server, and the request
  426. * should be retried later. The resolved image may be either an
  427. * Image or a Canvas DOM object.
  428. *
  429. * @exception {DeveloperError} <code>requestImage</code> must not be called before the imagery provider is ready.
  430. */
  431. WebMapServiceImageryProvider.prototype.requestImage = function(x, y, level, request) {
  432. var result;
  433. var timeDynamicImagery = this._timeDynamicImagery;
  434. var currentInterval;
  435. // Try and load from cache
  436. if (defined(timeDynamicImagery)) {
  437. currentInterval = timeDynamicImagery.currentInterval;
  438. result = timeDynamicImagery.getFromCache(x, y, level, request);
  439. }
  440. // Couldn't load from cache
  441. if (!defined(result)) {
  442. result = requestImage(this, x, y, level, request, currentInterval);
  443. }
  444. // If we are approaching an interval, preload this tile in the next interval
  445. if (defined(result) && defined(timeDynamicImagery)) {
  446. timeDynamicImagery.checkApproachingInterval(x, y, level, request);
  447. }
  448. return result;
  449. };
  450. /**
  451. * Asynchronously determines what features, if any, are located at a given longitude and latitude within
  452. * a tile. This function should not be called before {@link ImageryProvider#ready} returns true.
  453. *
  454. * @param {Number} x The tile X coordinate.
  455. * @param {Number} y The tile Y coordinate.
  456. * @param {Number} level The tile level.
  457. * @param {Number} longitude The longitude at which to pick features.
  458. * @param {Number} latitude The latitude at which to pick features.
  459. * @return {Promise.<ImageryLayerFeatureInfo[]>|undefined} A promise for the picked features that will resolve when the asynchronous
  460. * picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
  461. * instances. The array may be empty if no features are found at the given location.
  462. *
  463. * @exception {DeveloperError} <code>pickFeatures</code> must not be called before the imagery provider is ready.
  464. */
  465. WebMapServiceImageryProvider.prototype.pickFeatures = function(x, y, level, longitude, latitude) {
  466. var timeDynamicImagery = this._timeDynamicImagery;
  467. var currentInterval = defined(timeDynamicImagery) ? timeDynamicImagery.currentInterval : undefined;
  468. return pickFeatures(this, x, y, level, longitude, latitude, currentInterval);
  469. };
  470. /**
  471. * The default parameters to include in the WMS URL to obtain images. The values are as follows:
  472. * service=WMS
  473. * version=1.1.1
  474. * request=GetMap
  475. * styles=
  476. * format=image/jpeg
  477. *
  478. * @constant
  479. * @type {Object}
  480. */
  481. WebMapServiceImageryProvider.DefaultParameters = freezeObject({
  482. service : 'WMS',
  483. version : '1.1.1',
  484. request : 'GetMap',
  485. styles : '',
  486. format : 'image/jpeg'
  487. });
  488. /**
  489. * The default parameters to include in the WMS URL to get feature information. The values are as follows:
  490. * service=WMS
  491. * version=1.1.1
  492. * request=GetFeatureInfo
  493. *
  494. * @constant
  495. * @type {Object}
  496. */
  497. WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters = freezeObject({
  498. service : 'WMS',
  499. version : '1.1.1',
  500. request : 'GetFeatureInfo'
  501. });
  502. WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats = freezeObject([
  503. freezeObject(new GetFeatureInfoFormat('json', 'application/json')),
  504. freezeObject(new GetFeatureInfoFormat('xml', 'text/xml')),
  505. freezeObject(new GetFeatureInfoFormat('text', 'text/html'))
  506. ]);
  507. function objectToLowercase(obj) {
  508. var result = {};
  509. for ( var key in obj) {
  510. if (obj.hasOwnProperty(key)) {
  511. result[key.toLowerCase()] = obj[key];
  512. }
  513. }
  514. return result;
  515. }
  516. export default WebMapServiceImageryProvider;