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
--
View this message in context:
http://www.nabble.com/dynamical-filter-in-SLD-tf4563219.html#a13023691
Sent from the MapBuilder Users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users