[mapserver-users] Re: Feature wish: Internal mapfile variables

Bob Basques Bob.Basques at ci.stpaul.mn.us
Mon Oct 3 15:18:54 EDT 2011


Would adding in INCLUDEs from a URL be pushing it too much, as in: 

INCLUDE "http://Myserver.com/cgi-bin/myscript.pl" 

Could pass in parameters like so . . . 

INCLUDE "http://Myserver.com/cgi-bin/myscript.pl?A=first thing&b=second thing&c=third thing . . ." 


>>> "Smith, Michael ERDC-CRREL-NH" <Michael.Smith at usace.army.mil> wrote:

There is an RFC to have includes come from non-file connections
(databases). It would be another option



Michael Smith

Remote Sensing/GIS Center
US Army Corps of Engineers

On 10/3/11  2:51 PM, "Stephen Woodbridge" <woodbri at swoodbridge.com> wrote:

>One idea regarding this that you might want to consider is the ability
>to put all the named parameters in an include file, then be able to
>include that file via a CGI parameter. So it might look like this:
>   INCLUDE "client-params-%client_id%.inc"
>   ...
>And then you could have parameter files like:
>And these would include nothing but your SET ... commands.
>Then when requesting the map:
>This would make it very easy to manage a single mapfile for parameters
>that are different for each client/user.
>Obviously the client_id could be set via a cookie, or a wrapper script,
>or a session variable, or manually, etc.
>-Steve W
>On 10/3/2011 2:39 PM, reholl wrote:
>> I'm interested in working on capabilities along these lines.  Are there
>> existing RFCs that touch on this?  If not, perhaps one should be
>> This overlaps some configuration ideas I've been mulling over.  From the
>> original comment here about internal vars being handy for "/when the
>> layers are re-used for several customers who like to have a bit
>> styling for the same source data/" it occurs to me that a matrix or some
>> other constructs more complex than a flat list of internal variables
>> be called for -- provided they don't turn the mapfile and internal
>> into spaghetti..
>> Jukka Rahkonen (have I ordered your name properly?), do you want to
>>start an
>> RFC on this?
>> To anyone -- would this conversation typically migrate over to 'dev' ?
>> Robert Hollingsworth
>> I agree that this is a request that comes up often. As usual we'd just
>> need someone to lead the effort.
>> On 11-10-03 12:12 AM, Rahkonen Jukka wrote:
>>> Hi,
>>> Inspired by the Thomas Bonfort's rendering chain I have been thinking
>>> we could have a native support for using  internal mapfile variables.
>>> Thomas is setting for example a bunch of colours in a definition file
>>> which is converted into a real mapfile with python script and c
>>> preprocessor.
>>> http://mapserver-utils.googlecode.com/svn/trunk/README
>>> http://mapserver-utils.googlecode.com/svn/trunk/generate_style.py
>>> I would like to see a simple way for setting the variables directly in
>>> mapfile, somehow like
>>> MAP
>>> SET "pedestrian_clr"  "#fafaf5"
>>> SET "forest_clr" "#dcdcb4"
>>> SET "industrial_clr" "#ebe5d9"
>>> ....
>>> And then later in the layers use
>>> .....
>>> COLOR %pedestrian_clr%
>>> The internal variables could be interpreted only from the mapfile and
>>> could not be altered by the web users.
>>> Internal variable would help in maintaining big mapfiles with repeating
>>> styles like in the OpenStreetMap rendering case.  Another use case is
>>> the same layers are re-used for several customers who like to have a
>>> different styling for the same source data.
>>> -Jukka Rahkonen-
>> --
>> View this message in context:
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>mapserver-users mailing list
>mapserver-users at lists.osgeo.org

mapserver-users mailing list
mapserver-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111003/35d7eab7/attachment.html

More information about the mapserver-users mailing list