Hello all,<br><br>I&#39;ve beenmaking some experiences with openlayers and mapfish. I have postgis database and geoserver up and running. My problem is with wms created in my geoserver. I can load this wms in any thick client (qgis, gvsig) and if i choose the mappreview of the geoserver admin page it is also running ok (in the openlayers).<br>
<br>If i now try to make my own script it doesn´t shows anything. Any hint on what may be happening??<br>This is my very simple code. It is calling openlayers from mapfish (which i tried first with google layers and works fine):<br>
<br>&lt;!DOCTYPE html&gt;<br>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>&nbsp; &lt;head&gt;<br>&nbsp;&nbsp;&nbsp; &lt;title&gt;OpenLayers&lt;/title&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;../client/mfbase/openlayers/lib/Firebug/firebug.js&quot;&gt;&lt;/script&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;script src=&quot;<a href="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAqjXqK2AnPc3L2h71jEi4pxS89dNBXjbs3KhxedIObIPgZlGU8RSY0Afhq8cq5fuNgI-GZP2m_MM0Pw">http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAqjXqK2AnPc3L2h71jEi4pxS89dNBXjbs3KhxedIObIPgZlGU8RSY0Afhq8cq5fuNgI-GZP2m_MM0Pw</a>&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot; src=&quot;../../client/mfbase/openlayers/lib/OpenLayers.js&quot;&gt;&lt;/script&gt;<br>&nbsp;&nbsp;&nbsp; &lt;style&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #panel {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; right: 0px;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; height: 30px;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width: 200px;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #panel div {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; float: left;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin: 5px;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &lt;/style&gt;<br>&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br><br>&nbsp;&nbsp;&nbsp; function init(){&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var bounds = new OpenLayers.Bounds (-133259.566796875, -329230.621875, 176201.293359375, 304911.746875);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var options = {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: bounds,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxResolution: 2477.1186279296876,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection: &quot;EPSG:27492&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; units: &#39;m&#39;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;center&#39;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var caop =&nbsp; new OpenLayers.Layer.WMS (<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;CAOP&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>?&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;pg:caop&#39;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srs: &#39;EPSG:27492&#39;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; styles: &#39;&#39;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; format: &#39;image/png&#39;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {isBaseLayer: true}<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.addLayers([caop]);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();<br>&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>&nbsp; &lt;body onload=&quot;init()&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;div id=&quot;center&quot; style=&quot;width: 700px; height: 550px&quot;&gt;&lt;/div&gt;<br>
&nbsp; &lt;/body&gt;<br>&lt;/html&gt;<br><br><br>Thanks in advance,<br><br>Hugo<br>