[mapguide-users] MgSelection does not work

Langen, Gido Gido.Langen at NRCan-RNCan.gc.ca
Mon Oct 26 16:58:23 EDT 2009


Can anybody tell me why the following PHP code des not work - using
MapGuide 2010?  Everything works like a charm, except the MgSelection in
the end is not created.
Thanks for any help,
Gido 


$sessionId = $args['SESSION'];
$mapName = $args['MAPNAME'];
$userInfo = new MgUserInformation($sessionId);
$siteConnection = new MgSiteConnection();
$siteConnection->Open($userInfo);
$map = new MgMap($siteConnection);
$map->Open($mapName);
$layer = $map->GetLayers()->GetItem('parcels');
$parcelQuery = new MgFeatureQueryOptions();
$parcelQuery->SetFilter("PLANNO = '" . $planNo . "'");
$featureReader = $layer->SelectFeatures($parcelQuery);
$selection = new MgSelection($map); 
$selection->AddFeatures($layer, $featureReader, 0);



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20091026/6c712e7b/attachment.html


More information about the mapguide-users mailing list