Newbie problem with SetFilter
peter56
ibb.scigalla at arcor.de
Tue Sep 12 11:20:04 EDT 2006
Hallo,
here a typical newbie problem with the application of the sample code.
Like in the php-sample "Server-side Selection" (pages 47-49) I have tried to
select my own data. But the code don't work:
...
MgInitializeWebTier("$extensionsDir\webconfig.ini");
$webLayout = "Library://downtown/Layouts/downtwon_layout1.WebLayout";
$userInfo = new MgUserInformation($mgSessionId);
$siteConnection = new MgSiteConnection();
$siteConnection->Open ($userInfo);
$resourceService =
$siteConnection->CreateService(MgServiceType::ResourceService);
$featureService =
$siteConnection->CreateService(MgServiceType::FeatureService);
$map = new MgMap();
$map->Open($resourceService, $mapName);
$Optionen = new MgFeatureQueryOptions();
$Optionen->SetFilter("MAT LIKE 'PVC%'");
$featureResId = new
MgResourceIdentifier("Library://downtown/Data/wltg_lin.FeatureSource");
$featureReader = $featureService->SelectFeatures($featureResId,
'wltg_lin', $Optionen);
...
"wltg_lin" is the name of the layer and the name of the data-source. "MAT"
is an datafield and "PVC" a datavalue.
All data was generated by shp-files (exported from Autodesk MAP).
I'm working with XP, MG OS 1.0.1, Apache and php.
Please help to find my mistake.
Thanks in advance - Peter
--
View this message in context: http://www.nabble.com/Newbie-problem-with-SetFilter-tf2259520.html#a6268205
Sent from the OSGeo MapGuide forum at Nabble.com.
More information about the Mapguide-users
mailing list