[OpenLayers-Users] WMSGetFeatureInfo Format

Arnd Wippermann arnd.wippermann at web.de
Tue Mar 3 17:52:59 EST 2009


Hi Alexandre,
 
I would suggest, you have to use xml as parameter and not an xml object.

oFeatures = oFormat.read_msGMLOutput("response.xml");

Arnd Wippermann

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Alexandre Dube
Gesendet: Dienstag, 3. März 2009 21:21
An: OpenLayers users mailing list
Betreff: [OpenLayers-Users] WMSGetFeatureInfo Format

Hi users,

  I'm having a hard time using the WMSGetFeatureInfo format.

  Instead of explaining, below's snippet (1).  Because I currently can't
have a response from my server since I have problems with HTTPS and proxy, I
load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ).

  I get an empty features array.  Any clue what I'm doing wrong ?

(1) /*---------snippet---------*/
    showResult: function(response){
        var oFeatures;
        var oFormat = new OpenLayers.Format.WMSGetFeatureInfo();
        if(!response){
            var xmlDoc=document.implementation.createDocument("","",null);
            xmlDoc.async="false";
            xmlDoc.load("response.xml");
            oFeatures = oFormat.read_msGMLOutput(xmlDoc);
        } else {
            oFeatures = oFormat.read_msGMLOutput(response.responseXML ||
                                                 response.responseText);
        }

--
Alexandre Dubé
Mapgears
www.mapgears.com





More information about the Users mailing list