[mapguide-users] Re: Search/Query Results - Question
Homan, Thomas
thoman at co.gila.az.us
Wed Aug 10 12:11:32 EDT 2011
Thanks sir
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Steve G
Sent: Friday, August 05, 2011 8:59 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Re: Search/Query Results - Question
In order to sort your search query you have to make sure that the FDO
provider supports SelectOrdering. You can get the provider capabilities
using mapagent (go to Feature>GetCapabilities). Just type in the correct
provider and search the feature provider capabilities return for
"SupportsSelectOrdering". If this equals "true" then the provider will
allowing sorting, if false then it cannot (you might have to write some
custom code to sort the results).
Supposing you are using the standard search function, you can use the
following (enter into search.php):
// set ordering
$stringCollection = new MgStringCollection();
$stringCollection->Add("c_ref"); // SORT FIELD
$queryOptions->SetOrderingFilter($stringCollection,
MgOrderingOption::Descending); // SORT Asc or Desc
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Search-Query-Results-Question-tp6654244p6657053.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list