Hi, I'm currently trying to add WMSLayer to my map. I follow this example and it works well.
Here is my code
var layer = new Layer("http://go-tiles1.gistda.or.th/mapproxy/service", { id : "MY_WMS_LAYER" });
map.addLayer(layer);
However, this one requires me to use proxy page. Is there any way that allow me to not use proxy page when creating WMSLayer? I try to add use CORS enabled feature by adding this below code but it is also not working too.
esri.config.defaults.io.alwaysUseProxy = false;
esri.config.defaults.io.corsEnabledServers.push("go-tiles1.gistda.or.th");
Solved! Go to Solution.
According to the API:
The default behavior of a WMSLayer is to execute a WMS GetCapabilities request, which requires using a proxy page. See the Using the proxy page help topic for more details. An alternate approach is to pass a resourceInfo object into the constructor which does not require a GetCapabilities request.
According to the API:
The default behavior of a WMSLayer is to execute a WMS GetCapabilities request, which requires using a proxy page. See the Using the proxy page help topic for more details. An alternate approach is to pass a resourceInfo object into the constructor which does not require a GetCapabilities request.
Sorry for the late response.
Thanks for the explanation. I will tell my client about this