[Mapserver-users] MapFile - DATA question

Richard Greenwood Rich at GreenwoodMap.com
Tue Apr 8 17:34:53 EDT 2003


--=======7CB23BDB=======
Content-Type: text/plain; x-avg-checked=avg-ok-9E176DD; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit


>
> > Below are a few examples of
>>changing the filter clause. The %form_variable% substitutes the value 
>>from the form variable. I tried this with the data statement, but had 
>>limited success.
>>FILTER "pidn = '%pidn%' "
>>FILTER "pidn like '%pidn%%' "  # note the extra % for wild card
>>FILTER "(distance (table1.the_geom, (select the_geom from table1 where 
>>pidn='%pidn%')) < %rad%)"
>
>Why with limited success?
>Did you combine the FILTER with postgis/postgresql sucessfully?

I got the FILTER working just fine. But the same technique was not working 
for the DATA statement. I did not work very hard at it because the FILTER 
clause did what I needed. Possibly the value that I was passing to the DATA 
statement was not getting unescaped correctly ("geom+from+table" instead of 
"geom from table" ?).

In any case, my point was that it might be easier to to pass form variables 
than alter the DATA statement via the URI.

Rich



Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich at GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com 

--=======7CB23BDB=======--




More information about the mapserver-users mailing list