[OpenLayers-Users] Issues reading a GML file

Arnd Wippermann arnd.wippermann at web.de
Thu Jun 27 09:42:56 PDT 2013


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: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Nipuni
Piyabasi Perera
Gesendet: Donnerstag, 27. Juni 2013 04:59
An: openlayers-users at lists.osgeo.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130627/76a9c285/attachment.html>


More information about the Users mailing list