[mapguide-users] Query features based on a list or array of attribute values

soudemans soudemans at ruekert-mielke.com
Wed Nov 23 11:49:53 EST 2011


Hi, I am not sure how to go about this.  Perhaps one of you can set me on the
right path.

I have a list of values identifying features.  I got this list by querying
an independent attribute table.  For example I queried a hydrant inspection
table and got a list of hydrant ID numbers as part of the resulting report. 
Now, what I would like to do is select and high light the hydrant features
in the map corresponding to the ones represented in the report.  How can I
pass a list or array of Hydrant ID numbers to the hydrant layer to select
those previously selected hydrants?

I tried MgFeatureQueryOptions.SetFilter() but I can't seem to find a way to
pass a list or array as the parameters.  The SQL operator IN('Hyd1', 'Hyd2',
'etc') doesn't work and thus the only seemingly available option would be
something like "HydID = 'Hyd1' OR HydID = 'Hyd2' OR HydID = 'etc' "  This
would work of course, but it would be painful to construct, and if you have
a list of let's say a couple of hundred hydrants I am sure we could exceed
the parameter string limit by a significant amount.

Thanks for your suggestions and help


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Query-features-based-on-a-list-or-array-of-attribute-values-tp7025060p7025060.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list