[mapguide-users] filter for features

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


Hi,
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");

or 

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"  
substitutionGroup="gml:_Feature">
-    <xs:key name="parcelsKey">
        <xs:selector xpath=".//parcels" /> 
        <xs:field xpath="FeatId" /> 
  </xs:key>
 </xs:element>
- <xs:complexType name="parcelsType" abstract="false"
fdo:geometryName="Geometry">
-   <xs:complexContent>
-      <xs:extension base="gml:AbstractFeatureType">
-     <xs:sequence>
-         <xs:element name="FeatId">
-             <xs:simpleType>
                 <xs:restriction base="fdo:int32" /> 
              </xs:simpleType>
         </xs:element>
          <xs:element name="PROPADR" minOccurs="0">
-             <xs:simpleType>
-               <xs:restriction base="xs:string">
                  <xs:maxLength value="40" /> 
               </xs:restriction>
            </xs:simpleType>
         </xs:element>

-- 
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