[mapserver-users] Using a Symbol instead of text for a label

Matt McClelland matt at wildwalks.com
Thu Sep 29 17:56:13 EDT 2011


Thanks Bob

You are a genius.  I started playing with the TTF font idea yesterday, but
struggled with the idea because of the lack of colour within the font.  I
never considered using mapserver to stack the colours, brilliant.
I think I will use a mix of Davids suggestions using Cluster function, and
this font idea.

Is there anyway of getting map server to draw a line between the point on
the map and the label whilst using position auto.  If I have a fixed
position I can include the line as part of my icon.  But in Auto position is
there a way of drawing such a line?  I guess it would be similar to the call
out box concept in Google Maps.

BTW I came across a few interesting font pages for people looking at a
similar solution.
http://www.nps.gov/hfc/carto/map-symbols.htm  US National Parks fonts, a
good mix of general recreation and mapping symbols
http://georezo.net/jparis/MI_Enviro/TTFsymbols/ttf4mapping.htm a listing of
fonts helpful for mapping.  Zip download of the TTF files.  The page says
that the fonts are are freely available but no idea on the copyright status
is on the collection.

Thanks again

Matt  :)

On Fri, Sep 30, 2011 at 12:23 AM, Bob Basques
<Bob.Basques at ci.stpaul.mn.us>wrote:

>  Matt,
>
>  Interesting problem.   My gut solution would be to build (or find) a TTF
> font of the symbols you want to display, and simply use this font to label,
> just like text, only via the ttf symbols instead.  You would then be able to
> group the symbols, even label with multiple rows via a WRAP parameter.  Each
> Symbol, would become a single character in the label.  Might make the label
> assembly into a chore.  But it sounds like it's gets you what you are
> looking for.
>
>  If you have symbols that are multi-colored, never fear (with even more
> work) you can stack the symbols on top of each other to achieve most desired
> effects.
>
>  bobb
>
>
>
> >>> Matt McClelland <matt at wildwalks.com> wrote:
>
> Hi
>
> I have a bunch of symbols that overlap on a map. EG at a park where I want
> to show an symbol for playground, toilet and picnic tables. The data for
> each of these items are individual point data items.
>
> I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a
> group
> OR
> Use the main symbol like a label. So that I could have a dot where the play
> equipment is, then nearby have the symbol for the play equipment. This is
> obviously very easy to do with text, but is it possible with a symbol??
>
> I have tried this
> CLASS
> EXPRESSION /play|playground/
> NAME "Children's Playground"
> STYLE
> SYMBOL 'waypoint'
> color 255 0 0
> SIZE 5
> END
> LABEL
> STYLE
> SYMBOL '/var/www/osm/kml/icons/play.png'
> Size 10
> END
> ...text styleing info....
> END
> END
>
> I get my 'waypoint' dot and the play.png in the same location. I would like
> the play.png to be positioned AUTO like I can with text.
> Any ideas??
>
> Thanks
> Matt :)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110930/cc8d5292/attachment.html


More information about the mapserver-users mailing list