laptop and a wrench

Bug

Web Map Service (WMS) GetMap requests are sent as POST with an invalid encoded body when the GetMap requests' URL exceeds the configured maxUrlLength of @arcgis/core/config.

Zuletzt veröffentlicht: May 8, 2022 ArcGIS API for JavaScript
Bug-ID-Nummer BUG-000147618
EingereichtMarch 15, 2022
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS API for JavaScript
Gefunden in Version4.22
BetriebssystemWindows OS
Betriebssystemversion10.0 64 Bit
StatusWill Not Be Addressed

Zusätzliche Informationen

The Web Map Service (WMS) spec never standardized XML encoding for the post body, so GetMap requests as XML is not supported when sent as POST since the XML may be different for each server. Regarding always sending GetMap requests as GET, we decided against that as well, since we do not want to break existing layers where the server responds correctly. As an alternative, this request interceptor always makes a GET request: esriConfig.request.interceptors.push({ urls: "https://host/path", async before(params) { if (params.requestOptions.responseType === "image") { const url = new URL(params.url); url.search = new URLSearchParams([ ...Array.from(url.searchParams.entries()), ...Object.entries(params.requestOptions.query || {}) ]).toString(); const img = new Image() img.crossOrigin = "anonymous"; img.src = url.href; await img.decode() return img; } } });

Schritte zur Reproduzierung

Bug-ID: BUG-000147618

Software:

  • ArcGIS API for JavaScript

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln