[mapserver-users] Custom Annotation

Steve Lime steve.lime at dnr.state.mn.us
Mon Jun 10 11:04:23 EDT 2002


I'm assuming what Chris wants is control over the tracking between characters, or perhaps even enough control to allow text to "fill" a feature. There are kludges as suggested by Steve, but I think this warrants a more formal feature request, so we don't loose it. Chris would so be so kind as to add this to Bugzilla?

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Stephen Woodbridge <woodbri at swoodbridge.com> 06/08/02 09:57AM >>>
I would think this could be done with mapscript. I'm just thinking
outloud here, but if you created a layer that had the definition of how
you wanted your labels rendered, then in mapscript if you are in that
layer's min-max range, you could query the polygon shapefile given the
mapextents and get a list of the polygons. You would need to get the
point to place the label, then fetch the NAME attribute. In Perl:

my $newname = join(" ", split(//, $oldname));

will convert "PENNSYLVANIA"  to  "P E N N S Y L V A N I A"

then just draw the label using the layer's definition. I know this
sounds like a lot of work, but I think it is pretty straight forward
unless I am missing something.

-Steve

imap at chesapeake.net wrote:
> 
> I've a question about some custom annotation.. And I am hoping someone
> might have some ideas...
> 
> At certain mapscales, I'd like to display a state/province name
> annotated with spacing between the letters, like you might seen
> on printed cartographic maps...  ie.  A L B E R T A
> or: P E N N S Y L V A N I A
> 
> This isn't something I want to hardcode into the data, but it
> would be a nice feature to have a keyword (charspacing) or some
> such to accomplish the task.  Probably a knarly task, but I
> will throw the idea out there anyway...
> 
> Regards,
> 
> Chris




More information about the mapserver-users mailing list