Thanks for this configuration Pierre, it works for me too !

However, the GML result of this getFeature is a Point, but the picture on the 
map is not a point but a marker. Can I modify this ?


And, for this WFS url :
http://swing.brgm.fr/cgi-bin/limitesadm?service=wfs&version=1.0.0&request=getfeature&typename=departments&maxFeatures=1

the result is a Polygon, but nothing is drawing on the map whith this 
configuration :

            layer2 = new OpenLayers.Layer.WFS( "departm",
                "http://swing.brgm.fr/cgi-bin/limitesadm";,
                {typename: 'departments', maxfeatures: 1},
                { featureClass: OpenLayers.Feature.WFS});
            map.addLayer(layer2);

Why ?

Regards.

Florian



-----Message d'origine-----
De : Pierre GIRAUD [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 25 mai 2007 12:26
À : Husson Florian
Cc : [email protected]
Objet : Re: [OpenLayers-Users] create a layer from a getFeature url ?

This worked for me with this configuration :

function init(){
            OpenLayers.ProxyHost="/cgi-bin/proxy.cgi/?url=";
            map = new OpenLayers.Map('map');
            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://labs.metacarta.com/wms/vmap0";, {layers: 'basic'} );
            map.addLayer(layer);

            layer = new OpenLayers.Layer.WFS( "Owl Survey",
                "http://swing.brgm.fr/cgi-bin/carrieres";,
                {typename: "exploitationsponctualsproduction", maxfeatures: 1},
                { featureClass: OpenLayers.Feature.WFS});
            map.addLayer(layer);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.zoomToMaxExtent();
        }

Please note that you probably need a proxy if the domain of you html page and 
the one for the WFS server are not the same.

Regards.

Pierre

On 5/25/07, Husson Florian <[EMAIL PROTECTED]> wrote:
> My goal is to display on the map, the geometry result of a WFS getFeature.
>
> Something like that don't work, and I don't see how to do that...
>
> layer2 = new OpenLayers.Layer.WFS( "Quarry", 
> "http://swing.brgm.fr/cgi-bin/carrieres?request=getfeature&service=wfs&version=1.0.0&typename=exploitationsponctualsproduction&maxFeatures=1";,
>                 { typename: 'exploitationsponctualsproduction'},
>                 OpenLayers.Feature.WFS ); map.addLayer(layer2);
>
> I looked at getfeatureinfo.html, but I didn't find anything.
>
> I looked at OpenLayers.Format.GML too and that must be the thing which I 
> need, but I don't know how to make use of it and at which time I must call 
> upon my WFS getFeature.
>
>
> Regards,
> Florian HUSSON.
>
>
>
> -----Message d'origine-----
> De : Christopher Schmidt [mailto:[EMAIL PROTECTED] Envoyé : 
> jeudi 24 mai 2007 15:58 À : Husson Florian Cc : [email protected] 
> Objet : Re: [OpenLayers-Users] create a layer from a getFeature url ?
>
> On Thu, May 24, 2007 at 03:29:06PM +0200, Husson Florian wrote:
> > Hello,
> >
> > I work with openlayers 2.4 and geoserver 1.5.
> >
> > In my application, the user must type an WFS url (getFeature) in a 
> > textarea, and when he validate, I would like to draw the feature(s) 
> > result.
> > Is it possible?
>
> Yes. OpenLayers.Format.GML and the getfeatureinfo.html file in the examples 
> directory are probably both helpful.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> **********************************************************************
> ************************
>
> Pensez à l'environnement avant d'imprimer ce message  Think 
> Environment before printing
>
> Le contenu de ce mél et de ses pièces jointes est destiné à l'usage 
> exclusif du (des) destinataire(s) désigné(s) comme tel(s).
> En cas de réception par erreur, le signaler à son expéditeur et ne pas en 
> divulguer le contenu.
> L'absence de virus a été vérifiée à l'émission, il convient néanmoins 
> de s'assurer de l'absence de contamination à sa réception.
>
> The contents of this email and any attachments areconfidential. They 
> are intended for the named recipient(s) only.
> If you have received this email in error please notifythe system 
> manager or the sender immediately and do not disclose the contents to anyone 
> or make copies.
> eSafe scanned this email for viruses, vandals and malicious content.
>
> **********************************************************************
> ************************
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
**********************************************************************************************

Pensez à l'environnement avant d'imprimer ce message
 Think Environment before printing
 
Le contenu de ce mél et de ses pièces jointes est destiné à l'usage exclusif du 
(des) destinataire(s) désigné(s) 
comme tel(s). 
En cas de réception par erreur, le signaler à son expéditeur et ne pas en 
divulguer le contenu. 
L'absence de virus a été vérifiée à l'émission, il convient néanmoins de 
s'assurer de l'absence de 
contamination à sa réception.
 
The contents of this email and any attachments areconfidential. They are 
intended for the named recipient(s) 
only. 
If you have received this email in error please notifythe system manager or the 
sender immediately and do not 
disclose the contents to anyone or make copies. 
eSafe scanned this email for viruses, vandals and malicious content.
 
**********************************************************************************************

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to