[mapguide-users] MAPGUIDE ENTERPRISE - ADDING A LAYER FILTER IN RUN TIME

Kenneth, GEOGRAF A/S ks at geograf.dk
Wed Aug 23 04:48:12 EDT 2006


You need to modify the layer's filter property.
You should consider the datasource, a complete unit, such as a datatable 
or a spatial file. Since this source can be used in multiple layer, 
filtering it would possibly render it useless for other layers.
The layer, however, can easily be an extract of the datasource.

If you want to do this on a per-user basis, you need to grab the map 
that the user is currently seeing, through the resource service, and 
modify the layer, and then save it back.
You may of course want to create it on the fly, instead of modifying an 
exsiting one. Any changes saved to the session map, has effect in that 
session only.

Regards Kenneth, GEOGRAF



Bill MacDonald skrev:
>
> Hi,
> I have a map with a layer that is being populated from x/y coordinates 
> from an SQL server table and want to be able to dynamically add a 
> filter to the layer. Ie filter the data based on who is logged in.  
>
> I had found a few articles on how to dynamically select the items, but 
> have been unable to find anything about filtering the data returned by 
> server.
>
> I could easily do this in Mapguide 6.5 by specifiying the SQLWhere on 
> a layer, but it seems that it is not quite so straightforward with the 
> new version.
>
> Any information on how to do this would be greatly appreciated.
>
> Thanks
>
> Billy
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060823/27e1f811/attachment.html


More information about the Mapguide-users mailing list