extended feature source and selection

Charles rambo mach724 at hotmail.com
Fri Nov 3 05:40:19 EST 2006


Hi to all,

I have a problem when I want to select an object of which its layer uses an 
extended feature source.
This extended feature source is an Access data file and the layer come from 
a .shp file.

I use this script to select my object:

$resourceService = 
$siteConnection->CreateService(MgServiceType::ResourceService);
$featureService = 
$siteConnection->CreateService(MgServiceType::FeatureService);
$map = new MgMap();
$map->Open($resourceService, $mapName);

$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("RNAME LIKE 'Schmitt%'");
$featureResId = new 
MgResourceIdentifier("Library://Samples/Sheboygan/Data/Parcels.FeatureSource");

$layer = $map->GetLayers()->GetItem('Parcels');
$layerClassName = $layer->GetFeatureClassName();
$featureReader = $featureService->SelectFeatures($featureResId, 
$layerClassName, $queryOptions); //"Parcels" or extended feature source
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $featureReader, 0);
$selectionXml = $selection->ToXml();
echo 'Setting selection...';

This program works fine when I use the feature class without extended source 
(the object is highlighted).
It doesn’t work when I use an extended feature source.

Is something missing in this script?

Thanks

Charles

_________________________________________________________________
Windows Live Spaces : créez votre Space à votre image ! 
http://www.windowslivespaces.fr/





More information about the Mapguide-users mailing list