[mapguide-users] list selection example in c#
Micha Lehmann
paradoxe_vogelkunde at yahoo.de
Wed May 23 05:06:15 EDT 2007
hi there,
i want to use the listajaxselection.php example from the
developersguide, but i want to change it into c# syntax.
until line 64 its no big deal, but then i have problems, php is :
$layers = $selection->GetLayers();
if ($layers)
{
for ($i = 0; $i < $layers->GetCount(); $i++)
{
// Only check selected features in the Parcels layer.
$layer = $layers->GetItem($i);
if ($layer && $layer->GetName() == 'Parcels')
{
// Create a filter containing the IDs of the selected
features on this layer
$layerClassName = $layer->GetFeatureClassName();
$selectionString = $selection->GenerateFilter($layer,
$layerClassName);
// Get the feature resource for the selected layer
$layerFeatureId = $layer->GetFeatureSourceId();
$layerFeatureResource = new
MgResourceIdentifier($layerFeatureId);
// Apply the filter to the feature resource for the
selected layer. This returns
// an MgFeatureReader of all the selected features.
$queryOptions->SetFilter($selectionString);
$featureReader =
$featureService->SelectFeatures($layerFeatureResource, $layerClassName,
$queryOptions);
// Process each item in the MgFeatureReader, displaying the
owner name
while ($featureReader->ReadNext())
{
$val = $featureReader->GetString('NAME') . '<br
/> ' . $val = $featureReader->GetString('RPROPAD');
echo $val . '<br />';
}
}
}
}
else
echo 'No selected layers';
echo '</p>';
}
maybe you could help me a little bit !
Thanks
Micha
--
View this message in context: http://www.nabble.com/list-selection-example-in-c--tf3802759s16610.html#a10760071
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list