From 5f0ddfffc3217d89e55d06f3c85444ff2f281441 Mon Sep 17 00:00:00 2001 From: mircokroon Date: Sat, 17 Nov 2018 19:04:53 +0200 Subject: [PATCH 1/4] Added credit option --- Source/Scene/ArcGisMapServerImageryProvider.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index 1a76dd8caabc..adfff79626da 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -83,6 +83,7 @@ define([ * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified and used, * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither * parameter is specified, the WGS84 ellipsoid is used. + * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server. * @param {Number} [options.tileWidth=256] The width of each tile in pixels. This parameter is ignored when accessing a tiled server. * @param {Number} [options.tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server. * @param {Number} [options.maximumLevel] The maximum tile level to request, or undefined if there is no maximum. This parameter is ignored when accessing @@ -131,11 +132,15 @@ define([ this._tileHeight = defaultValue(options.tileHeight, 256); this._maximumLevel = options.maximumLevel; this._tilingScheme = defaultValue(options.tilingScheme, new GeographicTilingScheme({ ellipsoid : options.ellipsoid })); - this._credit = undefined; this._useTiles = defaultValue(options.usePreCachedTilesIfAvailable, true); this._rectangle = defaultValue(options.rectangle, this._tilingScheme.rectangle); this._layers = options.layers; + this._credit = defaultValue(options.credit, undefined); + if (typeof this._credit === "string") { + this._credit = new Credit(this._credit); + } + /** * Gets or sets a value indicating whether feature picking is enabled. If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will * invoke the "identify" operation on the ArcGIS server and return the features included in the response. If false, From dbe919cd52f6ba6933cf0423e894e78ccb1b9faf Mon Sep 17 00:00:00 2001 From: mircokroon Date: Sat, 17 Nov 2018 19:31:48 +0200 Subject: [PATCH 2/4] Fxed lint issues --- Source/Scene/ArcGisMapServerImageryProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index adfff79626da..8f4d3714ca06 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -137,10 +137,10 @@ define([ this._layers = options.layers; this._credit = defaultValue(options.credit, undefined); - if (typeof this._credit === "string") { + if (typeof this._credit === 'string') { this._credit = new Credit(this._credit); } - + /** * Gets or sets a value indicating whether feature picking is enabled. If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will * invoke the "identify" operation on the ArcGIS server and return the features included in the response. If false, From f930fe0be642e4926980e70a55a14b05e105b617 Mon Sep 17 00:00:00 2001 From: mircokroon Date: Sat, 17 Nov 2018 19:32:28 +0200 Subject: [PATCH 3/4] Added myself --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ef337b0a59d7..13c7421e34db 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -197,3 +197,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu * [Felix Palmer](https://github.com/felixpalmer) * [Cedric Le Roux](https://github.com/cleroux) * [Dag Wästberg](https://github.com/dwastberg) +* [Mirco Kroon](https://github.com/mircokroon) From 84082b7b62cbaca1375a9119715b7961c767ea93 Mon Sep 17 00:00:00 2001 From: Hannah Date: Wed, 26 Dec 2018 13:18:11 -0500 Subject: [PATCH 4/4] Update ArcGisMapServerImageryProvider.js --- Source/Scene/ArcGisMapServerImageryProvider.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index 8f4d3714ca06..03a5ad1a245f 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -136,10 +136,11 @@ define([ this._rectangle = defaultValue(options.rectangle, this._tilingScheme.rectangle); this._layers = options.layers; - this._credit = defaultValue(options.credit, undefined); - if (typeof this._credit === 'string') { - this._credit = new Credit(this._credit); + var credit = options.credit; + if (typeof credit === 'string') { + credit = new Credit(credit); } + this._credit = credit; /** * Gets or sets a value indicating whether feature picking is enabled. If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will