Hi,

I have looked into this more and it may not be the special characters. I can 
not change the filter in any way using this url parameter method. The only url 
filter parameter that works is an empty one:

mapserv?map.layer[0].filter=''&

If I add any filter into the single quotes (even a very simple one), then I get 
this error:

mapserv?map.layer[0].filter='oid=5'&

loadLayer(): Unknown identifier. Parsing error near (oid=5):(line 1)


Does anyone know the correct syntax for this parameter? I am going but this 
document page:

http://mapserver.org/cgi/controls.html

In this section:

Changing map file parameters via a form or a URL

Thanks,
Scott




********************************************* Scott Pezanowski 


email: [email protected]  
*********************************************



From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Changing map file parameters via a URL - special characters
Date: Wed, 11 Aug 2010 10:35:23 -0400








Hi,

I am trying to use mapserver to generate image maps from a PostGIS connection 
based upon a user entered FILTER. The data column I am trying to filter by is a 
tsvector column type. So the FILTER for my LAYER looks something like this:

FILTER "textsearchable_index_col @@ to_tsquery('search terms')"

I do have things working where I can hard code the FILTER for the LAYER in the 
MAP file. Things work great and I am very happy about this. The problem lies 
that I would now like to allow my client application to change this FILTER 
dynamically through a URL request based upon what search terms the user enters. 
So the URL would look something like this:

http://.../mapserv?map.layer[layername].filter=%22textsearchable_index_col%20@@%20to_tsquery%28%27newsearchterms%27%29%22&mode=map&map=mapfile.map&layers=layername&map_imagetype=png&mapext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&imgext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&map_size=1870+1321&imgx=935&imgy=660.5&imgxy=1870+1321

I am getting the following error:

loadLayer(): Unknown identifier. Parsing error near (textsearchable_index_col 
@@ to_tsquery('newsearchterms')):(line 1)


Through looking around a little, I believe the "@@" special characters in the 
filter parameter are causing the issue. Can anyone confirm that this is may be 
the case (or think of what else may be the issue) and suggest a workaround 
(escaping these characters in some way, etc.)?

Thanks,
Scott



********************************************* Scott Pezanowski 


email: [email protected]  
*********************************************

                                          
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to