From 6cf758751e8c34b61415254fa23ec109400e8ec3 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Sep 2019 09:29:09 -0400 Subject: [PATCH] Update DynamicMapLayer.js Fix for DynamicLayer and token/proxy with imageData response --- src/Layers/DynamicMapLayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Layers/DynamicMapLayer.js b/src/Layers/DynamicMapLayer.js index 1d6c41f2c..5b82132c4 100644 --- a/src/Layers/DynamicMapLayer.js +++ b/src/Layers/DynamicMapLayer.js @@ -179,10 +179,10 @@ export var DynamicMapLayer = RasterLayer.extend({ this.service.request('export', params, function (error, response) { if (error) { return; } // we really can't do anything here but authenticate or requesterror will fire - if (this.options.token) { + if (this.options.token && response.href) { response.href += ('?token=' + this.options.token); } - if (this.options.proxy) { + if (this.options.proxy && response.href) { response.href = this.options.proxy + '?' + response.href; } if (response.href) {