MapGuide API Reference
|
INT32 MgFeatureQueryOptions::AddFeatureProperty | ( | CREFSTRING | propertyName | ) |
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.
int AddFeatureProperty(string propertyName); |
int AddFeatureProperty(String propertyName); |
int AddFeatureProperty(string propertyName); |
propertyName | (String/string) The name of the class property to be added. |
<?php $queryOptions->AddFeatureProperty("aDouble"); $queryOptions->AddFeatureProperty("aSingle"); $featureService->SelectFeatures($featureSrcResourceId, $featClassName, $queryOptions); ?> sqlplus> select aDouble,aSingle from featclass;
MgInvalidArgumentException | if property name is empty |
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);