[mapguide-users] Selection Limit?

Mauricio Villablanca mgvillablanca at yahoo.com
Wed Jul 29 03:09:02 EDT 2009


You are right. The 2010 API documentation omitted that method and it's no
longer valid.



Nickthetemp wrote:
> 
> I tried the GenerateFilters method, but it is not a valid method for mge
> 2010. 
> 
> It just gave a warning saying it was not a valid method.
> 
> If there is a way to limit the selection to approx 200 items, it would
> also solve my prob.
> 
> I know in mge 2009, There was a selection size varible in the
> serverconfig.ini file but it is no longer present in mge 2010.
> 
> 
> 
> Mauricio Villablanca wrote:
>> 
>> I noticed $selection2->GenerateFilter($layer, $layerClassName) doesn't
>> always generate a valid filter in MGE2009. Use GenerateFilters instead
>> 
>> Check my post in the "Problem with MgSelection's SelectedFeatures" thread
>> started by Tom Lazo for selecting features.
>> 
>> 
>> Nickthetemp wrote:
>>> 
>>> Hello
>>> 
>>> I am using the following code to read through a selection and grab a 7
>>> digit number, which is then put into an array:
>>> 
>>>             $layerClassName = $layer->GetFeatureClassName();
>>>             $selectionString = $selection2->GenerateFilter($layer,
>>> $layerClassName);
>>> 
>>>             // Get the feature resource for the selected layer
>>> 
>>>             $layerFeatureId = $layer->GetFeatureSourceId();
>>>             $layerFeatureResource = new
>>> MgResourceIdentifier($layerFeatureId);
>>> 
>>>             // Apply the filter to the feature resource for the selected
>>> layer. This returns
>>>             // an MgFeatureReader of all the selected features.
>>> 
>>>             $queryOptions->SetFilter($selectionString);
>>>             $featureReader =
>>> $featureService->SelectFeatures($layerFeatureResource, $layerClassName,
>>> $queryOptions);
>>> 
>>>             // Process each item in the MgFeatureReader, displaying the
>>> PID
>>> 			
>>> 			while ($featureReader->ReadNext())
>>>             {
>>>               $valArray[$counter] = $featureReader->GetInt32('PID');
>>>               $counter = $counter + 1;
>>>             }
>>> 
>>> The code works fine until I hit a larger selection number. Is there a
>>> limit on the number of features that can be selected from a database?
>>> 
>>> I get the following error when the selection is big:
>>> 
>>> An exception occurred in FDO component. RDBMS: [IBM][CLI
>>> Driver][DB2/LINUX] SQL0010N The string constant beginning with ""MAPI"
>>> does not have an ending string delimiter. SQLSTATE=42603
>>> 
>>> Any help would be appreciated
>>> 
>>> Nick
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Selection-Limit--tp3321984p3348166.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list