Hello;<br><br>I'm trying to acces a WMS which doesn't support format: image/jpeg with the followin javascript<br><br>var map;<br> <br> function init(){<br> map = new OpenLayers.Map('map');<br>
var wms = new OpenLayers.Layer.WMS("Map", "<a href="http://server/">http://server/</a>?", {<br> layers: "OLA_Color",<br> format: "image/png"<br>
<br> });<br> <br> map.addLayer(wms);<br> map.addControl(new OpenLayers.Control.MousePosition());<br> <br> map.setCenter(new OpenLayers.LonLat(0, 0), 2);<br>
<br> <br> }<br><br>I'm obtaining the pink tiles, so I check the url generated by OpenLayers for one of the tiles and this is the url:<br><br><a href="http://server/?LAYERS=OLA_Color&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256">http://server/?LAYERS=OLA_Color&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90,0,0,90&WIDTH=256&HEIGHT=256</a><br>
<br>When I tried this in a browser (IE and Mozilla Firefox) the server give me an error related with the format which i'm asking for. So I change the url in the browser for this one:<br><br><a href="http://server/?LAYERS=OLA_Color&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-90,-90,0,0&WIDTH=256&HEIGHT=256">http://server/?LAYERS=OLA_Color&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG:4326&BBOX=-90,-90,0,0&WIDTH=256&HEIGHT=256</a><br>
<br>And I got the image. Basically, from this I concluded that the problem is with the "%2F" generated by openlayers instead of the "/" and the same with the "%3A" instead of ":". <br>
<br>Someone knows how I can deal with this problem?<br><br>Thank you for your help....<br><br><br>Camilo V.<br>