I try to display a GML file withe the following code with no success:

            var pistesLayer = new OpenLayers.Layer.Vector("Pistes", {
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                        url:"test.gml",
                        format: new OpenLayers.Format.GML()
                }),
                projection: new OpenLayers.Projection("EPSG:900913"),
            });

In the file, Firebug detect an error in the XML:

   
...d><nordic:z_order>0</nordic:z_order><nordic:piste:type>nordic</nordic:piste:t...
   ...-------------------------------------------------^

Is it possible that the 'double' namespace that come from the key piste:type causes the error ? The GML file come from Geoserver, I just copy in a file the answer of a small request from firebug to isolate my problem.

Yves

Full gml file (sorry, it's long):
|<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs"; xmlns||:wfs="http://www.opengis.net/wfs"; xmlns:nordic="nordic" xmlns:gml="http://www.opengis.net/gml"; xmlns||:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="nordic http://192.168.1.3:8080/geoserver||/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=nordic%3Aplanet_osm_line_nordic||http://www.opengis.net/wfs http://192.168.1.3:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd";><gml:boundedBy||><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#900913";><gml:coordinates xmlns:gml="http:||//www.opengis.net/gml" decimal="." cs="," ts=" ">698905.3125,5886692 700019.6875,5887962.5</gml:coordinates||></gml:Box></gml:boundedBy><gml:featureMember><nordic:planet_osm_line_nordic fid="planet_osm_line_nordic||.fid--22325cd_12d39469f32_211b"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg||.xml#900913"><gml:coordinates xmlns:gml="http://www.opengis.net/gml"; decimal="." cs="," ts=" ">698905||.34,5886692 699982.63,5887559.68</gml:coordinates></gml:Box></gml:boundedBy><nordic:osm_id>48469934<||/nordic:osm_id><nordic:z_order>0</nordic:z_order><nordic:piste:type>nordic</nordic:piste:type><nordic||:piste:difficulty>easy</nordic:piste:difficulty><nordic:piste:grooming>classic;skating</nordic:piste||:grooming><nordic:way><gml:LineString srsName="http://www.opengis.net/gml/srs/epsg.xml#900913";><gml:coordinates||xmlns:gml="http://www.opengis.net/gml"; decimal="." cs="," ts=" ">699982.63,5887559.68 699980.24,5887541||.77 699968.89,5887528.03 699936.04,5887513.09 699902.6,5887495.18 699848.86,5887462.33 699801.68,5887436||.06 699750.93,5887414.56 699695.98,5887407.99 699661.35,5887400.82 699637.46,5887391.27 699621.93,5887378||.13 699601.64,5887365.59 699578.94,5887355.44 699544.31,5887335.15 699528.18,5887320.81 699509.08,5887304||.68 699346.05,5887222.87 699295.89,5887202.57 699267.81,5887187.05 699243.34,5887168.53 699225.42,5887141||.67 699192.57,5887084.93 699159.13,5887041.93 699129.88,5887013.27 699075.53,5886955.95 699023.58,5886899||.21 698979.99,5886841.89 698952.51,5886800.07 698930.42,5886746.34 698911.92,5886700.36 698905.34,5886692||</gml:coordinates></gml:LineString></nordic:way></nordic:planet_osm_line_nordic></gml:featureMember>||<gml:featureMember><nordic:planet_osm_line_nordic fid="planet_osm_line_nordic.fid--22325cd_12d39469f32_211c"||><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#900913";><gml:coordinates xmlns||:gml="http://www.opengis.net/gml"; decimal="." cs="," ts=" ">699741.37,5887559.68 700019.64,5887962.16||</gml:coordinates></gml:Box></gml:boundedBy><nordic:osm_id>48469921</nordic:osm_id><nordic:z_order>0||</nordic:z_order><nordic:piste:type>nordic</nordic:piste:type><nordic:piste:difficulty>easy</nordic:piste||:difficulty><nordic:piste:grooming>classic;skating</nordic:piste:grooming><nordic:way><gml:LineString||srsName="http://www.opengis.net/gml/srs/epsg.xml#900913";><gml:coordinates xmlns:gml="http://www.opengis||.net/gml" decimal="." cs="," ts=" ">699741.37,5887962.16 699741.37,5887951.41 699748.54,5887927.53 699759||.29,5887909.62 699768.84,5887879.76 699760.48,5887851.09 699752.12,5887826.01 699747.35,5887809.29 699749||.73,5887796.15 699756.9,5887783.01 699770.03,5887777.04 699786.75,5887767.49 699804.68,5887744.79 699820||.19,5887711.36 699835.72,5887691.05 699860.8,5887668.36 699891.86,5887655.22 699909.77,5887631.34 699938||.44,5887600.28 699967.1,5887579.98 699982.63,5887568.03 699982.63,5887559.68 700019.64,5887560.88</gml||:coordinates></gml:LineString></nordic:way></nordic:planet_osm_line_nordic></gml:featureMember></wfs||:FeatureCollection>
|


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to