Pere,
This question is probably more appropriate for the mapbuilder-devel list.

I assume your client knows the user id?
In that case, yes you are right about inserting a filter into the 
WMC.xml doc.

I suggest that write JS which inserts the filter into the WMC, probably 
triggered when you process the user login in the client.

Code exists to pass a style (which includes attribute filtering) in with 
a layer request for WMS layers.
I don't think code has been written yet to pass the filters in for WFS 
(vector) layers, but there is currently work happening in this area.

pere roca wrote:
>   hi everybody,
>   I want the users to import and visualize their own point data. After
> inserting a CSV file in PostGIS, I want to make a selection of (only) this
> user's points (and visualize them). Multiple users could have previously
> inserted data in the same Points table; We can distinguish different data by
> a user_name field in the table. 
>
>   The question is what's the best way to get it in MapBuilder? I'm using
> version 1.5-apha1 and Geoserver.
>   I'm thinking in:
>   1) Modify the WMC.xml via php. I can insert, in the <Layer><Styles> the
> $user parameter
>
>     <SLD>
>       <StyledLayerDescriptor>
>           <ogc:Filter>                                                        
>                                 
>             <ogc:PropertyIsEqualTo>                                           
>                                                         
> <ogc:PropertyName>USER_NAME</ogc:PropertyName>
>    <ogc:Literal><? echo($USER); ?></ogc:Literal>
>             </ogc:PropertyIsEqualTo>
>          </ogc:Filter> 
>
>     It generates a GetMap request with SLD_BODY.
>
>   2) I can also have a points.php.sld ; similar to the previous one, we can
> pass a parameter in the GetMap request:
> .../SLD=http://myserver/points.php.sld?user=X  (example:
> http://synthesys.csic.es/SLD/states_filter.php?state='Arizona')
>      Here the problem is to make mapbuilder understand that when we are
> asking to visualize points data, send this kind of GetMap Requests,
> appending the user=X at the end. 
>
>      I was thinking about modifying wms_GetMap.xsl; The idea is: when you
> find an <style id="USING_PHP">, then
> SLD=http://myserver/points.php.sld?user= and add the parameter user_name. 
>      
>    <xsl:when test="wmc:StyleList/wmc:[EMAIL PROTECTED]'USING_PHP'
> @current='1']SLD="http://myserver/points.php.sld?user="/> (HERE PASSING
> USER_NAME PARAMETER)
>    </xsl:when> 
>
>   Does it makes sense? Anyone experienced similar challenges? Any
> workaround?
>   I suppose there should be no multi-user conflicts...
>
>
>   Thanks again,
>
>   Pere Roca
>
>   


-- 
Cameron Shorter
Systems Architect, http://lisasoft.com.au
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to