[mapguide-users] Filter features in the viewer
vittorio
vittorio.ricchiuto at hsh.it
Mon May 25 03:57:16 EDT 2009
Where can I find code examples regarding filter on the run-time layer?
I post my code used:
String whereClause = "FG = '3'";
String layerNameDaFiltrare = "par10";
MgFeatureQueryOptions queryOptions = new MgFeatureQueryOptions();
queryOptions.SetFilter(whereClause);
MgLayer layer = (MgLayer) map.GetLayers().GetItem(layerNameDaFiltrare);
MgFeatureReader featureReader = layer.SelectFeatures(queryOptions);
Thanks for your reponse.
Vittorio.
Kenneth Skovhede, GEOGRAF A/S wrote:
>
> You must set the filter on the RuntimeLayer, not the LayerDefinition.
> Also, look in the server log for clues.
> There is a quirk in MapGuide, that it will render the entire layer
> without filters, if the filter fails.
> I'm not sure you get a log message in that case, but start out with a
> simple filter like:
> ID = 3
>
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
>
> Vittorio Ricchiuto skrev:
>>
>> Hi,
>>
>>
>>
>> I would filter features in the viewer, how can I do? I filter with the
>> web API by SetFilter, but I do not see the effect on the map
>> although I refresh the map.
>>
>>
>>
>> Thank you for your help.
>>
>>
>>
>> Vittorio.
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
--
View this message in context: http://n2.nabble.com/Filter-features-in-the-viewer-tp2939889p2968435.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list