[mapguide-users] FeatureReader
ary sucaya
ary.sucaya at yahoo.com
Wed Dec 12 16:23:09 EST 2007
I'm really sure that i have exactly the same record size on both tables. Any way, i use MySql as joined table. Maybe this is another weakness of MySql. I also has another problem with joined record. If i made a query which return no result then MGOS server will get crash. I have to start this service after that. Unfortunately MGOS 1.2 and MapStudio only support MySql. Hopefully next release will support postgis as well
Ary Sucaya
----- Original Message ----
From: Bruce Dechant <bruce.dechant at autodesk.com>
To: MapGuide Users Mail List <mapguide-users at lists.osgeo.org>
Sent: Wednesday, December 12, 2007 9:57:24 PM
Subject: RE: [mapguide-users] FeatureReader
The reason you might be only getting a smaller subset of the data could be the type of join you setup.
If the primary only has 100 records and the secondary has 300 records and you are doing a 1 to 1 join – you will only end up with 100 records in your result set.
Try creating a Left Outer join with a one-to-many relationship to see if all your data is returned.
Bruce
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of ary sucaya
Sent: Tuesday, December 11, 2007 10:19 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] FeatureReader
Thank for replying,
There is no exception. Here is my code:
try
{
MgInitializeWebTier ($configFilePath);
$userInfo = new MgUserInformation($sessionId);
$siteConnection = new MgSiteConnection();
$siteConnection->Open($userInfo);
$resourceService = $siteConnection->CreateService(MgServiceType::ResourceService);
$map = new MgMap($siteConnection);
$map->Open($mapName);
$featureService = $siteConnection->CreateService(MgServiceType::FeatureService);
$queryOptions = new MgFeatureQueryOptions();
$queryOptions->SetFilter("FeatId > 0");
$layer = $map->GetLayers()->GetItem("District");
$featureResId = new MgResourceIdentifier($layer->GetFeatureSourceId());
$featureReader = $featureService->SelectFeatures($featureResId, $layer->GetFeatureClassName(), $queryOptions);
while ($featureReader->ReadNext())
{
echo $featureReader->GetInt32('DistrictID') . "<br />";
}
$featureReader->Close();
}
catch (MgException $e)
{
echo $e->GetMessage();
echo $e->GetDetails();
}
I have more than 300 record in layer District, but I can only see 100 record out of 300. I don't know what wrong..
Thanx,
Ary Sucaya
----- Original Message ----
From: Bruce Dechant <bruce.dechant at autodesk.com>
To: MapGuide Users Mail List <mapguide-users at lists.osgeo.org>
Sent: Tuesday, December 11, 2007 8:30:29 PM
Subject: RE: [mapguide-users] FeatureReader
There is no limit. Is an exception being thrown? If so that would give you a clue as to why it is not working as expected.
Thanks,
Bruce
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of ary sucaya
Sent: Monday, December 10, 2007 9:20 AM
To: Mapguide User
Subject: [mapguide-users] FeatureReader
Hii group,
I have a problem with feature reader. I have a sdf layer joined with external table and i can't make a looping for all of this records. It's always jump out the loop after 100 records. I tried the same code with different sdf layer without join to external layer, it's work well.
Is there any limitation of joined layer in MapGuide 1.2? Anyone can help me?
regards,
Ary Sucaya
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20071212/900f6bd5/attachment.html
More information about the mapguide-users
mailing list