[mapguide-users] Selection Issue (FeatureReader only grabbing 20 items)

Don C. MacGregor sir_sunkee at yahoo.ca
Mon Jul 21 11:46:14 EDT 2008


Earlier it was suggested by Jonathon...

Check out the serverconfig.ini file...there is a new setting in there that
limits it.



nclayton wrote:
> 
> Hi all,
> This has just recently become a problem. I am passing the selection xml to
> a page to display parcel owner data. For an example, I select 256 parcels
> on the map. The selection xml comes over fine, with all 256 parcels
> listed. When I use a featureReader to get the parcel numbers from the
> features, It only get the first 20.
> 
> Is this a setting I may have altered unintentionally, or could there be
> more to it?
> 
> Here is the code that I am using to pull the information out from the
> selection xml:
> ========================================================================
> function GetObjKeys($sessId,$mapName,$sel){
>   $obj_keys = '';
>     if($sel != ''){
>       InitializeWebTier();
>       $userInfo = new MgUserInformation($sessId);
>       $siteConnection = new MgSiteConnection();
>       $siteConnection->Open($userInfo);
>       $resourceService =
> $siteConnection->CreateService(MgServiceType::ResourceService);
>       $featureService =
> $siteConnection->CreateService(MgServiceType::FeatureService);	
>       $map = new MgMap($siteConnection);
>       $map->Open($resourceService,$mapName);		
>       $selection = new MgSelection($map,$sel);
>       if($selection != ''){
>         $layers = $selection->GetLayers();
>         if(!$layers){ $layers = $map->GetLayers(); }
>       }else{ $layers = 0; }
>       $layer = null;
>       if($layers){
>       for($i = 0; $i < $layers->GetCount(); $i++){
>         if($layers->GetItem($i)->GetName() == "parcels"){ $layer =
> $layers->GetItem($i); }
>       }
>       $queryOptions = new MgFeatureQueryOptions();
>       if($layer){
>         $layerClassName = $layer->GetFeatureClassName();
>         if($sel != ''){ $selString =
> $selection->GenerateFilter($layer,$layerClassName); }
>         $layerFeatureId = $layer->GetFeatureSourceId();
>         $layerFeatureResource = new MgResourceIdentifier($layerFeatureId);
>         $layerId = $layer->GetObjectId();
>         $queryOptions->SetFilter($selString);
>         $featureReader =
> $featureService->SelectFeatures($layerFeatureResource,$layerClassName,$queryOptions);				
>         $selTmp = '';
>         for($pdx=0; $pdx<$featureReader->GetPropertyCount(); $pdx++){
>           $pnm = $featureReader->GetPropertyName($pdx);
>           if($pnm == 'PARCEL_ID_'){ break; }
>           if($pnm == 'PARCELID'){ break; }
>           if($pnm == 'Key'){ break; }
>           $pnm = "";
>         }
>         if($pnm != ""){
>           while($featureReader->ReadNext()){
>             $stg = $featureReader->GetString($pnm);
>             if($stg != ""){	$obj_keys .= "'" . $stg . "'"; }
>           }
>         }
>         $obj_keys = str_replace("''","','",$obj_keys);
>       }
>     }	
>     return $obj_keys;
>   }else{ return ''; }
> }
> 

-- 
View this message in context: http://www.nabble.com/Selection-Issue-%28FeatureReader-only-grabbing-20-items%29-tp18570994p18571471.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list