[mapguide-users] Selection Issue (FeatureReader only grabbing
20items)
nclayton
nclayton at gmail.com
Mon Jul 21 11:42:14 EDT 2008
I'm using MySQL, though at this point in the process I'm not doing anything
with the database.
Maksim Sestic wrote:
>
> Yes, happens to me too here and there. No exceptions thrown, no errors
> reported. I'm not talking to MG via XML (did that before), rather via JSON
> web services being called from client's JavaScript. I also noticed
> described
> reader mishaps while using Autodesk's MS SQL provider. What RDBMS are you
> using?
>
> Regards,
> Maksim Sestic
>
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of nclayton
> Sent: Monday, July 21, 2008 17:25
> To: mapguide-users at lists.osgeo.org
> Subject: [mapguide-users] Selection Issue (FeatureReader only grabbing
> 20items)
>
>
> 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,$query
> Options);
> $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-item
> s%29-tp18570994p18570994.html
> 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
>
> __________ NOD32 3281 (20080718) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
> _______________________________________________
> 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/Selection-Issue-%28FeatureReader-only-grabbing-20-items%29-tp18570994p18571366.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list