[mapserver-users] Left click loses CGI variables (resolved)

Stephen Davies sdavies at sdc.com.au
Thu Dec 18 22:04:35 PST 2014


Thanks very much Steve.

That is what I had forgotten.

On 19/12/14 12:51, Lime, Steve D (MNIT) wrote:
> So this is mode=browse. MapServer templates are able to output anything passed in. If the variable passed in is called 'foo' then you can use the template tag [foo] to get at that value. Does that help? --Steve
> ________________________________________
> From: Stephen Davies [sdavies at sdc.com.au]
> Sent: Thursday, December 18, 2014 5:29 PM
> To: Lime, Steve D (MNIT); mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] Left click loses CGI variables
>
> I have MapServer 6.4.1 running on a CentOS 7 server with clients scattered all
> over the country with a variety of devices from full-blown PCs to iPhones and
> various Android devices all using a variety of browsers to view maps.
>
> Users with PDA devices (anything too small to be able to handle legends etc)
> are served with a direct call to mapserv (Generated from a menu selection
> after login).
>
> eg:
> http://www.agua.com.au/cgi-bin/mapserv?map=/tmp/11_63.map&client=63&dpi=96&LOC=&mapext=138.5417058+-35.2605136+138.5435908+-35.2562368&mre=-1074567.04+-4230140.65+284643.94+-2872042.86&pfilter=logger_id+in+%28select+id+from+logger+where+63=any%28client_id%29%29&bfilter=id+in+%280%29&wfilter=id+in+%280%29&ufilter=probe_id+in+%28451%29&MB=M&PID=&ET=D&sdt=18/12/2014&envfilter=
>
> The *filter variables are all used for run-time substitution.
>
> The above produces the correct result as each filter variable has a value.
>
> However, if the user then clicks the map, the *filter variables are lost.
>
> I don't necessarily see this as a MapServer problem; rather as something I am
> doing - or not doing.
>
> Cheers and thanks,
> Stephen
>
> On 19/12/14 02:40, Lime, Steve D (MNIT) wrote:
>> What sort of a client environment are you working in? This doesn't sound like a MapServer problem unless you're using mode=browse. I'd think you'd manage those variables within OL, Leaflet or whatever and just keep attaching values to calls back to the server.
>>
>> Steve
>>
>> -----Original Message-----
>> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Davies
>> Sent: Wednesday, December 17, 2014 8:33 PM
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] Left click loses CGI variables
>>
>> When sending output to PDA devices, I use a direct call to mapserv with several run-time substitution variables to set filters.
>>
>> This works perfectly for the initial display but if the user clicks the resulting map, the redisplay loses all of the variables.
>>
>> This led to errors in the redisplay because %foo% was no longer replaced so I added default_foo entries to the mapfile.
>>
>> This prevents the errors but means that nothing matches the default filter.
>>
>> How can I tell mapserv to retain the original variables?
>>
>> Cheers and thanks,
>> Stephen
>> --
>> =============================================================================
>> Stephen Davies Consulting P/L                             Phone: 08-8177 1595
>> Adelaide, South Australia.                                Mobile:040 304 0583
>> Records & Collections Management.
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> --
> =============================================================================
> Stephen Davies Consulting P/L                             Phone: 08-8177 1595
> Adelaide, South Australia.                                Mobile:040 304 0583
> Records & Collections Management.
>


-- 
=============================================================================
Stephen Davies Consulting P/L                             Phone: 08-8177 1595
Adelaide, South Australia.                                Mobile:040 304 0583
Records & Collections Management.


More information about the mapserver-users mailing list