Call this method for each class property whose value you want retrieved by the MgFeatureService::SelectFeatures() call. Not calling this method results in the retrieval of all property values for each feature selected.
.NET Syntax
Java Syntax
PHP Syntax
Example (PHP)
<?php $queryOptions->AddFeatureProperty("aDouble"); $queryOptions->AddFeatureProperty("aSingle"); $featureService->SelectFeatures($featureSrcResourceId, $featClassName, $queryOptions); ?> sqlplus> select aDouble,aSingle from featclass;
Example (C#)
using OSGeo.MapGuide; private MgFeatureQueryOptions queryOptions; private MgFeatureService featureService; private String className = "SdfFeatureClass"; // the SDF file identified by this MgResourceIdentifier exists in the repository private MgResourceIdentifier resourceId; private MgFeatureReader featureReader; resourceId = new MgResourceIdentifier("Library://PlatformApiDocTests/SdfFeatureClass.FeatureSource"); queryOptions = new MgFeatureQueryOptions(); queryOptions.AddFeatureProperty("FeatId"); queryOptions.AddFeatureProperty("anInt16"); featureReader = featureService.SelectFeatures(resourceId, className, queryOptions);
|