[mapguide-users] Problem with MgSelection's GetSelectedFeatures

Tom Lazo / Stygy tom.lazo at hotmail.com
Wed Jul 22 16:00:30 EDT 2009


Hi, 

Well, srry about my last post, quiet stupid...dun worry..i erased it.
Ok, i'm using the MgSelection as it follows	

        include ("Common.php");
        include('../../common/php/Utilities.php');
        include('Utilities.php');
	
	$featureService =
$siteConnection->CreateService(MgServiceType::FeatureService);

        $map = new MgMap();
        $map->Open($resourceService, $mapName);
	
	$selection = new MgSelection($map);
	$selection->Open($resourceService,$mapName);
		
	$layers = $map->GetLayers();
	
	$layer = $layers->GetItem("LOTES"); // Ya tengo mi MgLayerBase
	$className = $layer->GetFeatureClassName();
	
	$layersS = $selection->GetLayers();
	
	$ind = $layersS->IndexOf($layer);
	echo $ind . " \n ";
	
	$boolS = true;
	
	$featureCount = $selection->GetSelectedFeaturesCount($layer,$className); 
	echo $featureCount . " \n ";

	$featureReader = $selection->GetSelectedFeatures($layer,$className,$boolS); 

I have no problem with the GetSelectedFeaturesCount ( it gives me the
correct number), my problem is the  GetSelectedFeatures function... my app
crashes when i uncomment it. Could somebody tell me why ?

Thanks.

Tom 


-----
http://n2.nabble.com/file/u222842/warning.png   Stygy is not a living being!
-- 
View this message in context: http://n2.nabble.com/Problem-with-MgSelection%27s-GetSelectedFeatures-tp3305494p3305494.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list