WMS Layer not loading under Google Chrome

2758
1
04-25-2014 08:15 AM
YvanBérard
Occasional Contributor
Hey folks,

I don't know why, in my web app with the JS API 3.9, all my WMS Layer are not loading only in Google Chrome.

Under I.E. 11 and Firefox 28, all my WMS Layer are loading.

layer = new esri.layers.WMSLayer(http://www.cptaq.gouv.qc.ca/mapserver/cgi-bin/cptaq/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap, {
 format: "png",
 visibleLayers: [0,1,2,3,4,5],
 id:"cptaq"
});


How could I solve this?

Thank you.
0 Kudos
1 Reply
by Anonymous User
Not applicable
See this thread:  http://forums.arcgis.com/threads/98149-Chrome-WMS-and-content-type-application-vnd.ogc.wms_xml-fails..


Basically, it seems like Chrome isn't firing an event when the content type of the response to the GetCapabilities request is set as 'application/vnd.ogc.wms_xml'.  If you're using a proxy, you can overwrite this header with 'text/xml', and it'll get Chrome to behave as expected.

I posted a sample in that thread that shows the change I made to Esri's resource proxy to fix this in my case.
0 Kudos