AnsweredAssumed Answered

Javascript API v2.5 WMSLayer Image Format Bug

Question asked by abadata on Oct 20, 2011
Latest reply on Oct 20, 2011 by DSwingley-esristaff
When upgrading to 2.5, it seems that the setImageFormat is ignored by the api. When I set the image format to png, the actual request goes out as .jpeg. The same code using version 2.4 of the api, works as expected. Here is the code for the wms service:

topoBaseLayer = new esri.layers.WMSLayer("http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en");
topoBaseLayer.setVisibleLayers(["limits", "vegetation", "builtup_areas", "designated_areas", "hydrography", "hypsography", "water_saturated_soils", "landforms", "constructions", "water_features", "road_network", "railway", "populated_places", "structures", "power_network", "feature_names"]);
topoBaseLayer.setImageFormat("png");

The network traffic generated by v2.5 is shown in 2.5.jpg and the network traffic generated by v2.4 is shown in 2.4.jpg.

Just wondering if this is a bug in the new version or if I'm somehow not sending the request properly.

Thanks,

Kurtis.

Attachments

Outcomes