Hi,
I don't understand the esriConfig.request.proxyUrl ...
If I use only this property it doesn't work the proxy is never used and i have to add urlUtils.addProxyRule
Why ?
Sample:
const extent = new Extent({
xmin: 519515.85313172464,
ymin: 5630105.896252629,
xmax: 907815.9568202327,
ymax: 5767386.79905274,
spatialReference: new SpatialReference({wkid: 102100, latestWkid: 3857})
});
let layer = new MapImageLayer({
url:myUrl
});
esriConfig.request.proxyUrl = g_proxyUrl; // only doesn't work
/*
urlUtils.addProxyRule({
proxyUrl: my_proxyUrl,
urlPrefix: myPrefixUrl
});
urlUtils.addProxyRule({
proxyUrl: my_proxyUrl,
urlPrefix: "https://server.arcgisonline.com"
});*/
const tileLayer = new TileLayer({
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
});
const basemap = new Basemap({
baseLayers: [
tileLayer
]
});
let mapArcgisv4 = new Map({
basemap: basemap,
layers:[layer]
});
let view = new MapView({
map: mapArcgisv4,
extent : extent,
container: divHtmlId // Div element
});
Thanks for your explanation