queryByAttributes

Tim Schaub tim at COMMENSPACE.ORG
Wed Sep 28 11:01:54 EDT 2005


Hi Leo-

> Does The syntax for the query change if the field of the 
> shapefiles is type string or type numerical?  

For queryByAttributes(), your qstring can be a string even if your qitem
field is numeric.  Keep in mind that your query layer has to have a
TEMPLATE value (even the value "no template" will work).  Also, the
query only looks for shapes within the current extent of the map.  If
you want to query from all shapes, use setExtent() to set your map
extent to the extent of your query layer.

> Where can I find some examples?  

I pasted a quick (untested) example here:
http://rafb.net/paste/results/Tsqdaq42.html

Hope that helps,

Tim Schaub
www.commenspace.org



More information about the mapserver-users mailing list