Hello all,<br><br>I'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><!DOCTYPE html><br><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br> <head><br> <title>OpenLayers</title> <br> <script type="text/javascript" src="../client/mfbase/openlayers/lib/Firebug/firebug.js"></script><br>
<script src="<a href="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAqjXqK2AnPc3L2h71jEi4pxS89dNBXjbs3KhxedIObIPgZlGU8RSY0Afhq8cq5fuNgI-GZP2m_MM0Pw">http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAqjXqK2AnPc3L2h71jEi4pxS89dNBXjbs3KhxedIObIPgZlGU8RSY0Afhq8cq5fuNgI-GZP2m_MM0Pw</a>" type="text/javascript"></script><br>
<script type="text/javascript" src="../../client/mfbase/openlayers/lib/OpenLayers.js"></script><br> <style><br> #panel {<br> right: 0px;<br> height: 30px;<br>
width: 200px;<br> }<br> #panel div {<br> float: left;<br> margin: 5px;<br> }<br> </style><br> <script type="text/javascript"><br><br> function init(){ <br>
<br> var bounds = new OpenLayers.Bounds (-133259.566796875, -329230.621875, 176201.293359375, 304911.746875);<br> <br> var options = {<br> maxExtent: bounds,<br> maxResolution: 2477.1186279296876,<br>
projection: "EPSG:27492",<br> units: 'm'<br> }<br> <br> map = new OpenLayers.Map('center');<br> <br> var caop = new OpenLayers.Layer.WMS (<br>
"CAOP",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>?",<br> {<br> layers: 'pg:caop',<br> srs: 'EPSG:27492',<br>
styles: '',<br> format: 'image/png'<br> }, <br> {isBaseLayer: true}<br> );<br> <br> map.addLayers([caop]);<br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
map.zoomToMaxExtent();<br> };<br> <br> </script><br> </head><br> <body onload="init()"><br> <div id="center" style="width: 700px; height: 550px"></div><br>
</body><br></html><br><br><br>Thanks in advance,<br><br>Hugo<br>