[OpenLayers-Users] create a layer from a getFeature url ?

Husson Florian f.husson at brgm.fr
Fri May 25 04:49:52 EDT 2007


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:crschmidt at metacarta.com] 
Envoyé : jeudi 24 mai 2007 15:58
À : Husson Florian
Cc : users at openlayers.org
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.
 
**********************************************************************************************




More information about the Users mailing list