[prev in list] [next in list] [prev in thread] [next in thread]
List: mapguide-users
Subject: Re: [mapguide-users] Filter features in the viewer
From: "Kenneth Skovhede, GEOGRAF A/S" <ks () geograf ! dk>
Date: 2009-05-25 8:03:36
Message-ID: 4A1A50D8.7000306 () geograf ! dk
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Try this instead:
MgLayers.Filter = "FG = '3'";
map.Save();
Regards, Kenneth Skovhede, GEOGRAF A/S
vittorio skrev:
> 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@lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>
>
>
[Attachment #5 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Try this instead:<br>
<br>
MgLayers.Filter = "FG = '3'";<br>
map.Save();<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
vittorio skrev:
<blockquote cite="mid:1243238236863-2968435.post@n2.nabble.com"
type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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
<a class="moz-txt-link-abbreviated" \
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a> <a \
class="moz-txt-link-freetext" \
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a> <a \
class="moz-txt-link-freetext" \
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic