[Mapserver-users] Variable substitution 4.0.1

Steve Lime steve.lime at dnr.state.mn.us
Tue Jan 6 12:41:09 EST 2004


Variable substitution is only available in a couple of instances where
you might like to alter a portion of a parameter but not the whole
thing. This basically amounts to FILTERs and EXPRESSIONs and
CONNECTIONs. The other method you mention should be used instead. I
suspect that what's happening is that the map file parser reads the file
first and then augments it using substitutions (as limited above) or via
the other method, and the string you've got for image is indeed illegal.
To fix?

1) Don't use the substitution, use map_reference_image instead.
2) Change your mapfile like so:

REFERENCE
        IMAGE "passed in via URL"
        ...
END

Steve

>>> "Johansen Per Henrik" <phj at norgit.no> 1/6/2004 10:05:11 AM >>>
Hi,

I am a bit puzzled with the variable substition features in Mapserver.
It seems to work fine in some cases, like in the layer object, but when
I try to use this functionality in the reference object, I get a parser
error. getString(): Symbol definition error. Parsing error near (%)
I use it like this to use a dynamically created reference image:

REFERENCE
        IMAGE %refimage%
        ...
END

I have also tried to overwrite the IMAGE value by referencing it as
map_reference_image=... in the cgi call, but with the same result. 
Am I right to suspect that the REFERENCE objectdoes not support
variable substitution and cgi referencing?

Regards,

Per Henrik

--
Interconsult NORGIT AS
Per Henrik Johansen
Systemutvikler/Systems developer
Tel: + 47 69 394805   Mob: + 47 950 71822
icq: 4975767
Web: http://www.norgit.no 


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list