It is an Oracle feature source.
There is no error, but no sorting takes place.
The feature source supports sorting because this works well:
query.setSortBy(sortBy);
FeatureCollection featureCollection =
featureSource.getFeatures(query);
Beacuse FeatureCollection can have memory leakage I wanted to avoid using
FeatureCollection.
This does not work:
query.setSortBy(sortBy);
FeatureLayer.setQuery(query);
Ron
________________________________
From: Jody Garnett <[email protected]>
To: Ron Lindhoudt <[email protected]>
Cc: "[email protected]"
<[email protected]>
Sent: Sunday, November 11, 2012 7:53 AM
Subject: Re: [Geotools-gt2-users] Query.setSortBy does not sort when Query is
used in FeatureLayer.setQuery
Do you have any more details? What happens beyond - does not work. What feature
source are you working with?
Behind the scenes we try and combine your query with each query defined by your
style - and then draw the features as they come back.
Depending on the implementation if feature source ( and if it supports sorting
) you may get different behavior.
--
Jody Garnett
On 07/11/2012, at 12:33 PM, Ron Lindhoudt <[email protected]> wrote:
The Query.setSortBy does not work when used for FeatureLayer.setQuery
>
>There is no error but it just doesn't sort.
>
>
>
>The sorting works correctly when I use this:
>
>
>FeatureCollection featureCollection = featureSource.getFeatures(query);
>
>
>But because FeatureCollections have memory risks I want to avoid it.
>
>
>
>
>Ron
>
------------------------------------------------------------------------------
>LogMeIn Central: Instant, anywhere, Remote PC access and management.
>Stay in control, update software, and manage PCs from one command center
>Diagnose problems and improve visibility into emerging IT issues
>Automate, monitor and manage. Do more in less time with Central
>http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
>GeoTools-GT2-Users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users