[mapguide-users] list selection example in c#
Micha Lehmann
paradoxe_vogelkunde at yahoo.de
Wed May 23 09:24:09 EDT 2007
Once again Alessandro,
for the dwf viewer, is there another code ?
Micha
Alessandro Cacudi wrote:
>
> Hi, i had traduced (sorry for my bad english) the page in this mode
> Alex
>
> At 11.06 23/05/2007, you wrote:
>
>>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.
>>
>>_______________________________________________
>>mapguide-users mailing list
>>mapguide-users at lists.osgeo.org
>>http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://www.nabble.com/list-selection-example-in-c--tf3802759s16610.html#a10763857
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list