Variable substitution
Daniel Morissette
dmorissette at MAPGEARS.COM
Tue Apr 24 14:03:53 PDT 2007
I can confirm that %variable% substitution doesn't work for the label
text parameter, but it should be possible to set it using the
"map_layer_..." URL syntax as described in:
http://mapserver.gis.umn.edu/docs/reference/cgi/controls
Look for section "Changing map file parameters via a form or a URL" at
the end of this document.
Daniel
Richard Duivenvoorde wrote:
> Hi James,
>
> I've been fiddling with this also. But in
> http://mapserver.gis.umn.edu/docs/reference/mapfile/variable_sub/
> it states that since Mapserver 4.10.1 the only keywords that support
> variable substitution are: DATA TILEINDEX CONNECTION FILTER and EXPRESSION
> Don't know if somebody can confirm that?
>
> Richard Duivenvoorde
>
> Léveillé wrote:
>> Hi,
>>
>> I am trying to place a string at a known position.
>> The string must be passed in the URL (variable substitution).
>>
>> I was able to use variable substitution with the FILTER tag.
>> But in this case, I can't make it work with the TEXT tag and found
>> nothing on the list.
>>
>> Anybody knows how to do it ??
>>
>> Regards
>>
>>
>>
>> LAYER
>>
>> NAME "mylayer"
>> STATUS ON
>> DUMP TRUE
>>
>> EXTENT 30000 75000 1700000 2120000
>> TYPE ANNOTATION
>>
>> CONNECTIONTYPE OGR
>> CONNECTION "data\mytab.tab"
>> TRANSFORM FALSE
>> FORCE TRUE
>>
>> CLASS
>> TEXT "%xxx%"
>>
>> LABEL
>> TYPE TRUETYPE
>> FONT "verdana"
>> SIZE 10
>> POSITION LR
>> COLOR 0 0 0
>> OUTLINECOLOR 255 255 255
>> FORCE TRUE
>> END
>> END
>>
>> END
>>
>>
>> ______________________________________________________
>>
>> *JAMES LÉVEILLÉ
>> *Service des systèmes de Mission
>> Direction des technologies de l'information
>> Ministère des Transports du Québec
>>
>> 5833, boul. Pierre-Bertrand, 2ième étage
>> Québec (Québec) G2K 1K7
>> Téléphone: (418) 380-2005 poste 227
>> Télécopieur: (418) 644-6653
>> james.leveille at mtq.gouv.qc.ca <mailto:james.leveille at mtq.gouv.qc.ca>
>>
>>
>>
>>
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list