[OpenLayers-Dev] possible bug in GML parser

Christopher Schmidt crschmidt at metacarta.com
Fri Sep 14 13:21:06 EDT 2007


On Fri, Sep 14, 2007 at 05:10:09PM +0000, Jachym Cepicky wrote:
> Hi,
> 
> maybe, I found a bug in OpenLayers.Format.GML
> 
> I wrote small application for OGC WPS. User can run some process on the
> server and as response, the server sends XML document with embed GML.
> 
> The GML node can be extracted like:
> 
> var outputGML =
> response.responseXML.getElementsByTagName("ComplexValue")[0].firstChild;
> 
> // than would like to store it to OpenLayers.Layer.Vector:
> 
> var g =  new OpenLayers.Format.GML();
> var s = new XMLSerializer();
> var features = g.read(s.serializeToString(outputGML));
   ^^ these two lines are unneccesary -- you can just work with the
      outputGML object instead of serializing it first.

> myVectorLayer.addFeatures(features);
> myVectorLayer.redraw();

> What are the limitations of the GML parser in OL?

Much less now than in the version you are using :) Looks like your code
doens't have the changes we made in
http://trac.openlayers.org/ticket/938 / r4206, which fix parsing of
3dpoints, which your service is returning. 

So, if you merge trunk into your sandbox, it should all be working just
fine -- but your'e right that it was a bug :)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list