Hi everyone,<br><br>I m using openlayers for my application and I have a WFS layer filled by my mysql database using mapserver.<br><br>My layer inizialitazion is:<br>
var user_wfs = new OpenLayers.Layer.WFS( \"User Points\",<br>
\"<a href="http://localhost/cgi-bin/mapserv?map=/var/www/thesilence/webroot/mapserver/config/data_points.map&\">http://localhost/cgi-bin/mapserv?map=/var/www/thesilence/webroot/mapserver/config/data_points.map&\
</a>", <br>
{typename: \"points\"}, { featureClass: OpenLayers.Feature.WFS});<br>
<br>In my file.map i have the following layer:<br><br>LAYER<br> CONNECTION "my_points.ovf"<br> CONNECTIONTYPE OGR<br> DATA "points"<br> METADATA <br> "wms_srs" "EPSG:4326"
<br> "wms_title" "points"<br> "wfs_srs" "EPSG:4326"<br> "wfs_title" "points"<br> "gml_featureid" "fid"
<br> "gml_include_items" "all"<br> END<br> NAME "points"<br> SIZEUNITS PIXELS<br> STATUS ON<br> DUMP TRUE<br> PROJECTION<br> "init=epsg:4326"<br> END
<br> TOLERANCE 20<br> TOLERANCEUNITS PIXELS<br> TYPE POINT<br> UNITS METERS<br> <br> FILTERITEM "user_id"<br> #FILTER ""<br><br>where my_points.ovf is:<br><br><OGRVRTDataSource>
<br> <OGRVRTLayer name="points"><br> <SrcDataSource>ODBC:myuser/mypsw@mydns</SrcDataSource><br> <SrcSQL><br> SELECT data_points.id AS fid, latitude, longitude, des_walks.com_user_id AS user_id
<br> FROM data_points JOIN des_walks<br> WHERE des_walks.id = data_points.des_walk_id<br> </SrcSQL><br> <GeometryType>wkbPoint</GeometryType><br> <LayerSRS>WGS84</LayerSRS>
<br> <GeometryField encoding="PointFromColumns" x="longitude" y="latitude"/><br> </OGRVRTLayer><br></OGRVRTDataSource><br><br>but I need to change the value of the FILTER parameter in the map file via URL.
<br>
<br>The connection with database works and allows me to put my points on my map.<br>I would like to filter these data by "user_id" and show only the data linked to a specific user, but i have to pass this parameter via url because it is not always the same.
<br><br>
Now i m passing just the typename in the openlayers function, but i dont know how to change the FILTER parameter in my map file.<br> FILTERITEM "user_id"<br>
#FILTER ""<br><br>Any suggestion?<br>Thank you very much!<br><br>