Variable Substitution in Filter expression

Benedict Marillier Benedict.Marillier at DLI.WA.GOV.AU
Wed Apr 26 20:55:42 EDT 2006


Hi Ken,

Thanks for the suggestion, but still no joy. I suspect the map file is
not even substituting the variable. Is there some sort of tag that needs
to be set as well? 

If anyone has a fully functioning map file example with a URL which uses
variable substitution I would be interested to see it.

Cheers
Ben

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ken Lord
Sent: Thursday, April 27, 2006 1:01 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Variable Substitution in Filter
expression

Hi Benedict,

I do a variable substitution like yours, in my case I have it set in
my layer like this:

FILTERITEM "TYPE"
FILTER "%linearname%"

I think the problem is in your URL,  try it without the quotes around
the value.

Instead of:
street="SMITH%20ST"

use:
street=SMITH%20ST


Cheers,
Ken Lord
Vancouver BC



On 4/26/06, Benedict Marillier <Benedict.Marillier at dli.wa.gov.au> wrote:
>
>
>
>
>
> Hi All,
>
>
>
> I'm running mapserver 4.4.1.
>
>
>
> I've been trying to use a %variable% substitution to dynamically
filter a
> shapefile. I have tried several combinations however none seem to
work. The
> following filter works...
>
>  FILTER ("[ROAD_NAME]" == "SMITH ST")
>
> However, attempting to use...
>
> FILTER ("[ROAD_NAME]" == "%street%")
>
>
>
>
> with the URL...
>
>
>
>
mapserv.exe?map=variable.map&request=getmap&version=1.1.1&service=wms&la
yers=roads,copyright,lga,cadastre&BBOX=115.96538,-31.90127,115.96738,-31
.89927&street="SMITH%20ST"
>
>
>
> does not.
>
>
>
> I've had no joy with any of the following either...
>
>           FILTER "ROAD_NAME = '%street%'"
> or
>      FILTERITEM 'ROAD_NAME'
>      FILTER '%street%'
>
>
>
> Any suggestions appreciated.
>
>
>
> Cheers
>
> Ben
>
>
>
>
>
> This e-mail and any files transmitted with it are intended only for
the use
> of the addressee(s). It may contain information that is confidential
and
> privileged. If you are not an intended recipient, any use,
interference
> with, disclosure, distribution or copying of this material is
unauthorised
> and prohibited. If you receive this in error, please notify the author
by
> Return email to the sender. Information in this message not relating
to the
> official business of DLI shall be understood as neither given nor
endorsed
> by it. While every care is taken, it is recommended that you scan any
> attachments for viruses. DLI liability is limited to re-supplying
affected
> attachments.
>
>
>
> **********************
>
> PLEASE NOTE: All dola.wa.gov.au and vgo.wa.gov.au email addresses have
been
> decommissioned. These have been replaced by dli.wa.gov.au addresses.
Please
> ensure that your records are updated to reflect this change. Further
> information can be obtained by contacting our service desk on 92737533
or
> emailing Servicedesk at dli.wa.gov.au
>
>
>
> **********************
>
>



More information about the mapserver-users mailing list