laptop and a wrench

Bug

ArcGIS API for JavaScript 4.3 SceneView WGS84 MapImageLayer requests send image request with real number size parameters.

Last Published: April 28, 2017 ArcGIS API for JavaScript
Bug ID Number BUG-000103574
SubmittedMarch 13, 2017
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.2
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusKnown Limit

Additional Information

No plans for implementing this workaround client-side as the problem only exists with legacy unsupported services (pre 10.1). Please continue to use the workaround provided initially.

Workaround

Subclass the MapImageLayer:var HeightFixMapImageLayer = MapImageLayer.createSubclass({ getImageUrl: function (options, callback) { console.log("options: ",options); var self = this, serviceUrl = this.parsedUrl.path + "/export"; // Fix the width if (!Number.isInteger(options.width)) { console.log("width is not an integer: " + options.width); options.width = parseInt(options.width); } // Fix the height if (!Number.isInteger(options.height)) { console.log("height is not an integer: " + options.height); options.height = parseInt(options.height); } // Following from the MapImageLayer.getImageUrl options = lang.mixin({}, this.parsedUrl.query, this.createExportImageParameters(options), { f: "image", token: this.token }); var url = serviceUrl + "?" + ioquery.objectToQuery(options); if (url.length > config.request.maxUrlLength) { options.f = "json"; request(serviceUrl, { query: options, responseType: "json", callbackParamName: "callback" }).then(function (a) { return a.data.href + (self.token ? "?token\x3d" + self.token : ""); }).then(callback); } else { callback(url); } } });

Steps to Reproduce

Bug ID: BUG-000103574

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options