Numéro d’ID de bogue |
BUG-000103574 |
Envoi | March 13, 2017 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS API for JavaScript |
Version trouvée | 4.2 |
Système d’exploitation | Windows OS |
Version du système d’exploitation | 10.0 64 Bit |
Statut | Known Limit
Après examen par l’équipe de développement, il a été déterminé que ce problème est lié à une limitation connue du logiciel sur laquelle Esri n’a aucun contrôle. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
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.
Solution de contournement
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); } } });
Étapes pour reproduire
ID de bogue: BUG-000103574
Logiciel:
- ArcGIS API for JavaScript