[mapguide-users] Mix of selectfeature and selectaggregate query

Dave Wilson dave.wilson at autodesk.com
Wed Dec 16 12:21:14 EST 2009


I think you want to do your initial query using SelectAggregates and set the Distinct flag to get a unique list of Postal Codes. From your result page the user could select a code and then you would use a SelectFeatures query to return all the actual points adding them to a SelectionSet and zooming to that.

Dave

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jo Cook
Sent: Wednesday, December 16, 2009 9:52 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Mix of selectfeature and selectaggregate query


Dear All,

I have a layer of postcodes, which has more than one point per postcode (eg
all the houses with that postcode). I would like people to be able to do a
"fuzzy selection" to choose their postcode, eg "RM14" returns all the
postcodes with RM14 at the beginning. I would then like the results of this
to be grouped and listed, so that only one entry per postcode is given.
People should then be able to select that postcode, and zoom in to the total
spatial extent of all the points with that postcode. I hope that makes
sense!

I have implemented the initial selection using SelectFeature with the
appropriate queryoption, so the fuzzy search works and returns multiple
values. However, I can't figure out whether I can rewrite this using
SelectAggregate and the same queryoption as the documentation only seems to
talk about a groupingfilter and I'm not sure that's what I want.

I'm then wondering if I can either convert the results returned from the
SelectFeature query into a list of unique values directly in php, or whether
I can do a SelectAggregate query on the results, or if indeed there's a much
better way that I'm missing!

If someone could talk me through the basic steps, I'd be very grateful- it's
hard for me to copy code over as I'm working in a chain of windows remote
desktop servers that don't allow copy and paste.

Thanks

Jo
-- 
View this message in context: http://n2.nabble.com/Mix-of-selectfeature-and-selectaggregate-query-tp4176453p4176453.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