[OpenLayers-Users] openLayer and GML3.1 ?

Tim Schaub tschaub at openplans.org
Fri Nov 9 15:04:53 EST 2007


Hey-

Sébastien Geindre wrote:
> hi everybody,
> 
> It seems that OL could build GML geometry from polygon feature.
> But, gml data seems to be GML2, am i wrong ?
> 

OpenLayers doesn't currently deal correctly or completely with 
protocol/payload versions for WMS, WFS, KML, or GML.  For example, if 
you set the version (param) of a WMS layer to "1.3.0" you don't get WMS 
1.3 requests.  The same is true for WFS.  And for the GML and KML 
formats.  Sorry for the bad news.

We can correct this without breaking the API (so it won't require 
OpenLayers 3.0), but it will require some significant work.

I'm hoping to find time to improve the situation for GML soon.  Then for 
WFS.  These are portions of OpenLayers that have not previously gotten 
much support.

Tim


> is thre any work on GML3 ? in the sand box ?
> 
>        /**
>          * Method: buildGeometry.polygon
>          * Given an OpenLayers polygon geometry, create a GML polygon.
>          *
>          * Parameters:
>          * geometry - {<OpenLayers.Geometry.Polygon>} A polygon geometry.
>          *
>          * Returns:
>          * {DOMElement} A GML polygon node.
>          */
>         polygon: function(geometry) {
>             var gml = this.createElementNS(this.gmlns, "gml:Polygon");
>             var rings = geometry.components;
>             var ringMember, ringGeom, type;
>             for(var i=0; i<rings.length; ++i) {
>                 type = (i==0) ? "outerBoundaryIs" : "innerBoundaryIs";
>                 ringMember = this.createElementNS(this.gmlns,
>                                                   "gml:" + type);
>                 ringGeom = this.buildGeometry.linearring.apply(this,
>                                                                    
> [rings[i]]);
>                 ringMember.appendChild(ringGeom);
>                 gml.appendChild(ringMember);
>             }
>             return gml;
>         }
> 




More information about the Users mailing list