Pedro,<br><br>Isto normalmente acontece quando o browser não consegue carregar o OpenLayers. Consegues verificar com o Firebug que o a biblioteca está a ser correctamente carregada?<br><br>Também podes experimentar carregar directamente da página do OpenLayers:<br>
<br><script src="<a href="http://openlayers.org/dev/OpenLayers.js">http://openlayers.org/dev/OpenLayers.js</a>"></script><br><br>Boa sorte,<br><br>Luís<br><br> <br><br><div class="gmail_quote">2010/6/11 Pedro Venâncio <span dir="ltr"><<a href="mailto:pedrongvenancio@yahoo.com">pedrongvenancio@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Olá bom dia,<br><br>Também estou a iniciar-me no Geoserver (há cerca de uma semana) e tenho este mesmo problema do Oscar. <br><br>Fazendo a edição com o uDig via WFS-T, tudo corre bem, consigo ver o resultado da edição, tanto na base de dados, como no QGIS, mal faço "Commit changes" no uDig. <br>
<br>No entanto, utilizando o exemplo wfs-t.html, mesmo com as alterações da bbox que resolveram o problema ao Oscar, não consigo visualizar o WFS. Aliás, com os as alterações do Oscar, nem aparecem os WMS, nem sequer os controlos do OpenLayers. <br>
<br>Deixo aqui o código que estou a testar:<br><br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"><br> <head><br> <link rel="stylesheet"
href="<a href="http://localhost:8080/geoserver/style.css" target="_blank">http://localhost:8080/geoserver/style.css</a>" type="text/css" /><br> <style type="text/css"><br> body {<br>
margin: 1em;<br> }<br> #map {<br> width: 800px;<br> height: 475px;<br> border: 1px solid black;<br> }<br> </style><div class="im"><br><br> <script src="<a href="http://openlayers.org/api/OpenLayers.js" target="_blank">http://openlayers.org/api/OpenLayers.js</a>"></script><br>
<script type="text/javascript"><br><br> OpenLayers.IMAGE_RELOAD_ATTEMPTS =
3;<br> var map;<br><br> function init(){<br> <br> var bounds = new OpenLayers.Bounds(<br></div> 71085.954, 100001.161,<br> 102603.730, 145416.122<div class="im">
<br> );<br><br> var options = {<br> controls:
[],<br> maxExtent: bounds,<br> maxResolution: 87.17609375,<br></div> projection: "EPSG:3763",<div class="im"><br> units: 'm'<br>
};<br> <br> map = new OpenLayers.Map('map',
options);<br> <br></div> var vias = new OpenLayers.Layer.WMS(<br> "Rede Viaria",<br> "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
{layers: 'pinhel:rede_viaria',<br> projection: new OpenLayers.Projection("EPSG:3763"),<br> displayProjection: new
OpenLayers.Projection("EPSG:3763"),<br> format: 'image/png'}<br> );<br> <br> <br><br> <br> pedreiras.style = OpenLayers.Util.applyDefaults({strokeColor: "#ff0000"},<div class="im">
<br> OpenLayers.Feature.Vector.style["default"]);<br><br></div> var ocorrencias = new
OpenLayers.Layer.WFS(<br> "Ocorrências",<br> "<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>",<br> {typename: 'pinhel:ocorrencias'},<br>
{<br> typename: 'ocorrencias',<br> featureNS: '<a href="http://localhost:8080/pinhel" target="_blank">http://localhost:8080/pinhel</a>',<br> extractAttributes:
false,<br> srsName: 'EPSG:3763',<br> geometryName: 'the_geom'<br> }<br> );<br> ocorrencias.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"},<div class="im">
<br> OpenLayers.Feature.Vector.style["default"]);<br> <br><br></div>
map.addLayers([vias, ocorrencias]);<div><div></div><div class="h5"><br><br><br> var panel = new OpenLayers.Control.Panel(<br> {displayClass: 'olControlEditingToolbar'}<br> );<br>
<br> var drawLine = new OpenLayers.Control.DrawFeature(<br> eixos_via, OpenLayers.Handler.Path,<br> {displayClass: 'olControlDrawFeaturePath'}<br> );<br>
drawLine.featureAdded = function(feature) {<br> feature.layer.eraseFeatures([feature]);<br> // cast to multilinestring<br> feature.geometry = new OpenLayers.Geometry.MultiLineString(<br>
feature.geometry<br> );<br> feature.style.strokeColor = "#ff0000";<br> feature.state =
OpenLayers.State.INSERT;<br> feature.layer.drawFeature(feature);<br> }<br><br> var drawPoint = new OpenLayers.Control.DrawFeature(<br> pontos_interesse, OpenLayers.Handler.Point,<br>
{displayClass: 'olControlDrawFeaturePoint'}<br> );<br> drawPoint.featureAdded = function(feature) {<br>
feature.layer.eraseFeatures([feature]);<br> feature.style.strokeColor = "#0000ff";<br> feature.state = OpenLayers.State.INSERT;<br> feature.layer.drawFeature(feature);<br>
}<br> <br> panel.addControls(<br> [new OpenLayers.Control.Navigation(), drawLine, drawPoint]<br>
);<br> <br> map.addControl(panel);<br> map.addControl(new OpenLayers.Control.LayerSwitcher());<br> map.addControl(new OpenLayers.Control.ScaleLine());<br> map.addControl(new OpenLayers.Control.PanZoomBar());<br>
map.addControl(new OpenLayers.Control.MousePosition());<br> <br>
map.zoomToExtent(bounds);<br> <br> }<br> </script><br></div></div> </head><br> <body onload="init()"><br> <h3>OpenLayers WFS-T demo: Tasmania cities and roads</h3><br>
<a href="#" onclick="map.layers[2].commit();return false">Save Roads</a><br /><br> <a href="#" onclick="map.layers[3].commit();return false">Save Cities</a><div class="im">
<br> <div id="map"></div><br> </body><br></html><br><br></div>Abraço!<br>Pedro Venâncio<br></td></tr></tbody></table><br>
<br>_______________________________________________<br>
Portugal mailing list<br>
<a href="mailto:Portugal@lists.osgeo.org">Portugal@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/portugal" target="_blank">http://lists.osgeo.org/mailman/listinfo/portugal</a><br>
<br></blockquote></div><br>