[OpenLayers-Dev] possible bug in GML parser

Jachym Cepicky jachym.cepicky at gmail.com
Fri Sep 14 13:10:09 EDT 2007


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));
myVectorLayer.addFeatures(features);
myVectorLayer.redraw();

New vector features are displayed in map window, but the result is a
mess.

I setup example at
http://www.bnhelp.cz/mapserv/pokusy/OpenLayers/jachym/openlayers/examples/wps.html

To reproduce the possible bug, please do following:

1 - digitize point
2 - unminize WPS tab (under LayerSwitcher)
3 - confirm server
4 - select "Buffer" process
5 - set buffer width (0.1 - 1)
6 - "Execute" the process


Server output will be displayed with GML before and after it was
imported to OpenLayers.

The critical part of the code can be found at
http://trac.openlayers.org/browser/sandbox/jachym/openlayers/lib/OpenLayers/Control/WPS.js

lines 805 - 845 method parseExecuteResponse.


What are the limitations of the GML parser in OL?

Thanks

Jachym

-- 
Jachym Cepicky
e-mail: jachym.cepicky at gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
	=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
	=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070914/1072d98f/attachment.bin


More information about the Dev mailing list