[OpenLayers-Users] WFS - sortBy

Grzegorz Kowal wolktm at gmail.com
Wed Jan 27 06:54:38 EST 2010


Hi,

1. I'm making a vector layer with WFS protocol. I would like to get sorted
features by field "inserted"  in desc order.

I see that there is a <ogc:SortBy> element in OGC specs. but I
can't figure out how to do this.

My example, it works fine, it gets all the right stuff but sortBy does not
work.

var poi = new OpenLayers.Layer.Vector("tweets", {
 strategies: [
new OpenLayers.Strategy.Cluster()
,new OpenLayers.Strategy.BBOX()
],
                     protocol: new OpenLayers.Protocol.WFS({
                        version: "1.1.0",
                        url:  host + service,
                        featureType: "twitter_cache",
                        featureNS: "http://zegt.nu",
*sortBy: "inserted"*
                     })
                     ,projection: new OpenLayers.Projection("EPSG:4326")
     ,styleMap: pointMap
                });

2. how to gain more control over wfs:Query, wfs:PropertyName and ogc:Filter

<wfs:Query typeName="topp:states">
    *<wfs:PropertyName>topp:STATE_NAME</wfs:PropertyName>*
*    <wfs:PropertyName>topp:PERSONS</wfs:PropertyName>*
    <*ogc:Filter*>
      (...)
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>



-- 
salut
#wolktm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100127/ec49f422/attachment.html


More information about the Users mailing list