Numéro d’ID de bogue |
BUG-000147618 |
Envoi | March 15, 2022 |
Dernière modification | June 5, 2024 |
S’applique à | ArcGIS API for JavaScript |
Version trouvée | 4.22 |
Système d’exploitation | Windows OS |
Version du système d’exploitation | 10.0 64 Bit |
Statut | Will Not Be Addressed
L’équipe de développement a examiné le problème ou la demande et a décidé qu’ils ne seraient pas traités. Pour d’autres explications, reportez-vous à la section Informations supplémentaires correspondant au problème.
|
Informations supplémentaires
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;
}
}
});
Étapes pour reproduire
ID de bogue: BUG-000147618
Logiciel:
- ArcGIS API for JavaScript