Olá,<br><br>Finalmente a problema foi resolvido. Depois de ter dado tantas voltas, não termino de perceber porque é assim, mas funciona. Basicamente, acho que era por não ter definido correctamente as <i>bounds</i>, mas o estranho é que eu conseguia visualizar a área correcta do mapa, se não, não tivesse conseguido ver a <i>layer </i>WMS, eu acho. <br>
<br>Agradeço imenso a ajuda do Luís e do Fernando. Espero poder retornar isto algum dia. <br><br>Segue em baixo o código final das OpenaLayers (só mostro isto porque é o único que alterei), a cor verde identifica o código acrescentado/alterado:<br>
<br><br><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <script src="<a href="http://openlayers.org/api/OpenLayers.js">http://openlayers.org/api/OpenLayers.js</a>"></script></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <script type="text/javascript"></span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> var map;</span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> function init(){</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <b style="color: rgb(0, 153, 0);"> var bounds = new OpenLayers.Bounds(</b></span><b style="color: rgb(0, 153, 0);"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -119192.24, -42077.98,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> -96875.16, -26545.94</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var options = {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> controls: [],</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> maxExtent: bounds,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> maxResolution: 87.17609375,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> projection: "EPSG:20791",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> units: 'm'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> };</span></b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> map = new OpenLayers.Map('map', <b style="color: rgb(0, 153, 0);">options</b>);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var political = new OpenLayers.Layer.WMS(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> "State", </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "/geoserver/wms",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {layers: 'space:peniche',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> projection: new OpenLayers.Projection("EPSG:20791"),</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> displayProjection: new OpenLayers.Projection("EPSG:20791"),</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> format: 'image/png'}</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var eixos_via = new OpenLayers.Layer.WFS(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> "Eixos de Via", </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "<a href="http://IP_DO_TEU_SERVIDOR:8080/geoserver/wfs">http://IP_DO_TEU_SERVIDOR:8080/geoserver/wfs</a>",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {typename: 'space:eixos_via_peniche'},</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> typename: 'eixos_via_peniche', </span><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> featureNS: 'http://</span><span style="font-family: courier new,monospace;">IP_DO_TEU_SERVIDOR</span><span style="font-family: courier new,monospace;">:8080/space', </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> extractAttributes: false,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> srsName: 'EPSG:20791',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> geometryName: 'the_geom'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> eixos_via.style = OpenLayers.Util.applyDefaults({strokeColor: "#ff0000"}, </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> OpenLayers.Feature.Vector.style["default"]);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> var pontos_interesse = new OpenLayers.Layer.WFS(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> "Pontos de Interesse",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> "http://</span><span style="font-family: courier new,monospace;">IP_DO_TEU_SERVIDOR</span><span style="font-family: courier new,monospace;">:8080/geoserver/wfs",</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {typename: 'space:pontos_interese_peniche'},</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> typename: 'pontos_interese_peniche',</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> featureNS: 'http://</span><span style="font-family: courier new,monospace;">IP_DO_TEU_SERVIDOR</span><span style="font-family: courier new,monospace;">:8080/space',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> extractAttributes: false,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> srsName: 'EPSG:20791',</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> geometryName: 'the_geom'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> pontos_interesse.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"}, </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> OpenLayers.Feature.Vector.style["default"]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> map.addLayers([political, eixos_via, pontos_interesse]);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var panel = new OpenLayers.Control.Panel(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {displayClass: 'olControlEditingToolbar'}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var drawLine = new OpenLayers.Control.DrawFeature(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> eixos_via, OpenLayers.Handler.Path,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {displayClass: 'olControlDrawFeaturePath'}</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> drawLine.featureAdded = function(feature) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> feature.layer.eraseFeatures([feature]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // cast to multilinestring</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> feature.geometry = new OpenLayers.Geometry.MultiLineString(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> feature.geometry</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> feature.style.strokeColor = "#ff0000";</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> feature.state = OpenLayers.State.INSERT;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> feature.layer.drawFeature(feature);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var drawPoint = new OpenLayers.Control.DrawFeature(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> pontos_interesse, OpenLayers.Handler.Point,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {displayClass: 'olControlDrawFeaturePoint'}</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> drawPoint.featureAdded = function(feature) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> feature.layer.eraseFeatures([feature]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> feature.style.strokeColor = "#0000ff";</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> feature.state = OpenLayers.State.INSERT;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> feature.layer.drawFeature(feature);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> panel.addControls(</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> [new OpenLayers.Control.Navigation(), drawLine, drawPoint]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> map.addControl(panel);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> map.addControl(new OpenLayers.Control.LayerSwitcher());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> map.addControl(new OpenLayers.Control.ScaleLine());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> map.addControl(new OpenLayers.Control.PanZoomBar());</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> map.addControl(new OpenLayers.Control.MousePosition());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;"> <br> <b style="color: rgb(0, 153, 0);">map.zoomToExtent(bounds);</b></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </script></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><br><br>