laptop and a wrench

Bogue

ArcGIS API for JavaScript 2.3 cannot overlay the Web Mapping Service (WMS) and cached Map Service.

Dernière publication: December 8, 2014 ArcGIS API for JavaScript
Numéro d’ID de bogue NIM070310
EnvoiJuly 8, 2011
Dernière modificationJune 5, 2024
S’applique àArcGIS API for JavaScript
Version trouvée2.3
Langue du programmeJavaScript
Système d’exploitationWindows OS
Version du système d’exploitationXP
StatutNon-Reproducible

Informations supplémentaires

Cannot reproduce using 3.11

Solution de contournement

1) The map displays in ArciGIS for API for JavaScript 2.3 if it comments out the WMS layer map.addLayers([wmsLayer]);2) wmsLayer.getImageUrl = function (_c, _d, _e, _f) { if (!this.visibleLayers || this.visibleLayers.length === 0) { _f(this._blankImageURL); return; } var _12 = _c.xmin; var _13 = _c.xmax; var _14 = _c.ymin; var _15 = _c.ymax; var _16 = {}; _16.SERVICE = "WMS"; _16.REQUEST = "GetMap"; _16.FORMAT = this.imageFormat; _16.TRANSPARENT = this.imageTransparency ? "TRUE" : "FALSE"; _16.STYLES = ""; _16.VERSION = this.version; _16.LAYERS = this.visibleLayers ? this.visibleLayers.toString() : null; _16.WIDTH = _d; _16.HEIGHT = _e; if (this.maxWidth < _d) { _16.WIDTH = this.maxWidth; } if (this.maxHeight < _e) { _16.HEIGHT = this.maxHeight; } var _17 = _c.spatialReference ? _c.spatialReference.wkid : NaN; if (!isNaN(_17)) { if (this.version == "1.3.0") { _16.CRS = "EPSG:" + _17; } else { _16.SRS = "EPSG:" + _17; } } if (this.version == "1.3.0" && this._useLatLong(_17)) { _16.BBOX = _14 + "," + _12 + "," + _15 + "," + _13; } else { _16.BBOX = _12 + "," + _14 + "," + _13 + "," + _15; } var _18 = this.getMapURL; _18 += (_18.indexOf("?") == -1) ? "?" : ""; for (var key in _16) { _18 += (_18.substring(_18.length - 1, _18.length) == "?") ? "" : "&"; _18 += key + "=" + _16[key]; } _f(_18); }; map.addLayers([wmsLayer]);Please open the ‘layers_Workaround_23.html’ page in he web browser. It implements the workaround. It displays the map inspite of using ArcGIS API for JavaScript 2.3

Étapes pour reproduire

ID de bogue: NIM070310

Logiciel:

  • ArcGIS API for JavaScript

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement