[mapguide-users] filter for features

EvaD evadraganov at yahoo.com
Wed Oct 1 10:33:26 EDT 2008

I am having problem with filter for features. 
The code is working when I filter by “PROPADR” for the parcels layer, but
when I use the filter with the property “FeatId”, the result is empty.  
Here is the syntax I used for both cases:

MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions();
queryOptions.SetFilter("FeatId = 112");


MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions();
queryOptions.SetFilter("PROPADR  LIKE 'DEININGER RD'");

I try to verify the Xml schema of the layer, but it seem that the “FeatId”
is Int32 , and “PROPADR” is a string. 
Is there some syntax problem in my code, or why the filter is not working in
case “FeatId” ? 

I need to have unique identifier for the parcels, and it seems from the
schema that “FeatId” is the key.
Here is the part of Xml schema for the layer:
   <xs:element name="parcels" type="Default:parcelsType" abstract="false"  
-    <xs:key name="parcelsKey">
        <xs:selector xpath=".//parcels" /> 
        <xs:field xpath="FeatId" /> 
- <xs:complexType name="parcelsType" abstract="false"
-   <xs:complexContent>
-      <xs:extension base="gml:AbstractFeatureType">
-     <xs:sequence>
-         <xs:element name="FeatId">
-             <xs:simpleType>
                 <xs:restriction base="fdo:int32" /> 
          <xs:element name="PROPADR" minOccurs="0">
-             <xs:simpleType>
-               <xs:restriction base="xs:string">
                  <xs:maxLength value="40" /> 

View this message in context: http://www.nabble.com/filter-for-features-tp19761808p19761808.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list