php/mapscript label question

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Mar 31 15:01:48 PST 2005


Yes, set the CLASS -> TEXT -> value to the string you want output.
so something like:

$oClass->set("text", $mytext);

should do it.

-Steve W.

Jeff Portwine wrote:
> Is there any way to set the "labelitem" to look at a PHP variable rather
> than an actual attribute in the shapefile for the purpose of labeling?
> In my case, I want to overlay route numbers on "sign" symbols.   The
> Tiger line data has street names shown like "State Highway 10" or
> whatever and I would like to read that in PHP and change it to just
> "10".
>
> I couldn't find any way to do what I want in the documentation so I may
> be stuck writing a script to go through every county's tiger data adding
> a column to the .dbf file... but I was hoping to avoid that extra
> scripting work if I could possibly do so.
>
> Thanks,
> Jeff
>



More information about the MapServer-users mailing list