It works better with :
<gml:featureMembers .....>
     <wims:tma>
         <wims:geometry>
             <gml:Polygon srsName="EPSG:4326">
                 <gml:exterior>
                     <gml:LinearRing>
                         <gml:posList>49.97 0.67 49.97 3.90 47.66 3.90 
47.66 0.67 49.97 0.67</gml:posList>
                     </gml:LinearRing>
                 </gml:exterior>
             </gml:Polygon>
         </wims:geometry>
     </wims:tma>
</gml:featureMembers>

and
     var tma = new OpenLayers.Layer.GML("CDG TMA", "tmaCDG.gml",
     {
         format: OpenLayers.Format.GML.v3,
         formatOptions : {
             featureType: "tma",
             featureNS: "http://www.flysafe-eu.org/wims";,
             geometryName: "geometry",
             srsName: "urn:x-ogc:def:crs:EPSG:4326",
             schemaLocation: "http://www.flysafe-eu.org/wims memo.xsd"
         }
     });

Sébastien Geindre a écrit :
> hello all,
> 
> In OL2.7, I try to parse a simple GML v3 feature, but it does not work.
> 
> 
> var tma = new OpenLayers.Layer.GML("CDG TMA", "tmaCDG.gml", {format: 
> OpenLayers.Format.GML.v3});
> 
> the file tmaCDG.gml :
> 
> <?xml version="1.0" encoding="URF-8"?>
> <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml";>
>       <gml:featureMember>
>               <gml:Polygon srsName="EPSG:4326">
>                       <gml:exterior>
>                               <gml:LinearRing>
>                                       <gml:posList>49.97 0.67 49.97 3.90 
> 47.66 3.90 47.66 0.67 49.97 
> 0.67</gml:posList>
>                               </gml:LinearRing>
>                       </gml:exterior>
>               </gml:Polygon>
>       </gml:featureMember>
> </gml:FeatureCollection>
> 
> The file is well-parsed but features in GML.js line 139 is empty...
> this.readNode(elements[i], {features: features});
> 
> is there any example of parsing GML v3 ?
> 
> thanks
> 
> 
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
> 


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

Reply via email to