<!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>