R: [mapguide-users] Filter features in the viewer

vittorio vittorio.ricchiuto at hsh.it
Mon May 25 07:18:43 EDT 2009


MgLayers.Filter? I don’t found this in the MapGuide Java API

 

Da: Kenneth Skovhede, GEOGRAF A/S (via Nabble)
[mailto:ml-user+64672-363962087 at n2.nabble.com] 
Inviato: lunedì 25 maggio 2009 12.38
A: vittorio
Oggetto: Re: [mapguide-users] Filter features in the viewer

 

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 at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2969000&i=0> 
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  
      

_______________________________________________
mapguide-users mailing list
mapguide-users at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2969000&i=1> 
http://lists.osgeo.org/mailman/listinfo/mapguide-users
 
 
    

 
  


_______________________________________________ 
mapguide-users mailing list 
mapguide-users at ...
<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2969000&i=2>  
http://lists.osgeo.org/mailman/listinfo/mapguide-users



  _____  

This email is a reply to your post @
http://n2.nabble.com/Filter-features-in-the-viewer-tp2939889p2969000.html
You can reply by email or by visting the link above.

 


-- 
View this message in context: http://n2.nabble.com/Filter-features-in-the-viewer-tp2939889p2969134.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090525/efe9de6b/attachment.html


More information about the mapguide-users mailing list