[Portugal] Erro ao ler WFS gerado no Geoserver 2.0.2 no OpenLayers 2.10

Jorge de Jesus jmdj at pml.ac.uk
Wed Jan 12 09:31:01 EST 2011



Eu quando tive de trabalhar em openlayers foi com o mapserver (isto ha 2
anos...) e nao tive de usar a porta 8080  portanto nao tive problemas,
desculpem pela informacao incorrecta :)

Mas lembro-me que tive ainda algumas horas a bater com a cabeca nas
paredes porque as layers WFS nao apareciam, no final era um problema de
namespaces, que eh ligeramente diferente entre mapserver e geoserver

Jorge


On 12/01/11 14:13, Hugo wrote:
> Olá,
>
>
>
>     O OpenLayers.ProxyHost so tem de ser configurado se estas a aceder
>     a um
>     a web service que esteja num outro server quando tens tudo em
>     localhost
>     nao necessitas de Proxyhost
>
>
> Isto não é bem assim Jorge. Mesmo no caso de ter tudo no mesmo
> servidor os domínios não são os mesmos e não respeitam a regra /Same
> Origin Policy/. http://localhost não é o mesmo domínio que
> http://localhost:8080.
>
> No caso do WMS de facto não é preciso preocuparmo-nos com o proxy mas
> no caso do WFS é estritamente necessário configurarmos o proxy. Outro
> problema também recorrente na utilização de WFS em Openlayers é o
> namespace (que é definido ao nível do geoserver por exemplo). Tenta
> definir o teu WFS da seguinte forma:
>
> var pontos2 = new OpenLayers.Layer.Vector(
>                 "WFS PostgreSQL",
>                 {
>                     projection: mercator,
>                     strategies: [new OpenLayers.Strategy.BBOX()],
>                     protocol: new OpenLayers.Protocol.WFS({
>                         version: '1.1.0',
>                         url: 'http://localhost:8080/geoserver/wfs?',
>                         srsName: 'EPSG:900913',
>                         featureType: 'sede_concelhos',
>                         featureNS: 'http://localhost/open',
>                         geometryName: 'the_geom'
>                     })
>                 }
>             );
>
>
>
>     Nao  sei que a ponto estao habituados a fazer desenvolvimento em
>     Javascript mas aconselho a usar a extensao firebug to firefox
>
>     http://getfirebug.com/
>
>     dar uma vista de olhos aos tutoriais e depois usar o firebug para
>     ver o
>     que o servidor esta a mandar e tb ver se existe algo dentro do var
>     wfslayer
>
>
> Sem dúvida que o firebug é uma ferramenta essencial e muito poderosa
> no debugging e tweaking.
>
> Espero ter ajudado.
> Abc,
>
> Hugo
>  
>
>
>
> -- 
> Hugo Martins
> LabNT - ISEGI UNL
> Campus de Campolide
> 1070-312 Lisboa
> N 38°43'56.84", W 9°9'35.74"
>
>
> _______________________________________________
> Portugal mailing list
> Portugal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/portugal


--------------------------------------------------------------------------------
Plymouth Marine Laboratory
 
Registered Office:
Prospect Place 
The Hoe
Plymouth  PL1 3DH
 
Website: www.pml.ac.uk
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail forinfo at pml.ac.uk and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/portugal/attachments/20110112/a8bff76a/attachment.html


More information about the Portugal mailing list