[mapguide-users] filter for features

Jackie Ng jumpinjackie at gmail.com
Wed Oct 1 15:55:51 EDT 2008


What type of data is your parcels? SDF, SHP, Other?

- Jackie


Eva wrote:
> 
> 
> 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.
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

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



More information about the mapguide-users mailing list