Your gml is in format gml3
 
try with:
format: new OpenLayers.Format.GML.v3()
 
i had to add xmlns:xsi to the xml to get it loaded.

<gml:FeatureCollection xmlns:xsi="
<http://www.w3.org/2001/XMLSchema-instance>
http://www.w3.org/2001/XMLSchema-instance";  xsi:schemaLocation="
<http://www.opengis.net/gml> http://www.opengis.net/gml ...
 
Arnd
 

  _____  

Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nipuni
Piyabasi Perera
Gesendet: Donnerstag, 27. Juni 2013 04:59
An: [email protected]
Betreff: [OpenLayers-Users] Issues reading a GML file



Hi, 


We are trying to read and visualize GML data output given by a WPS process
in using OpenLayers. According to our current requirement, we write the GML
output to a file. When trying to read the file using a client written
similar to GML example <http://openlayers.org/dev/examples/gml-layer.html>
with OpenLayers, it is not visualized. But polygon.xml[1] file works
properly with the same client. 

Input file we tried: https://www.dropbox.com/s/zxma61o566qmnb5/GML.xml
I used the content starting with gml:FeatureCollection tag.


[1]
http://dev.openlayers.org/releases/OpenLayers-2.12/examples/gml/polygon.xml

Thanks,

Nipuni

-- 

Nipuni Piyabasi Perera
Undergraduate 
Department of Computer Science And Engineering
University of Moratuwa 
Sri Lanka
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to