Able to change text color in Placemark Name tag?

2,000 views
Skip to first unread message

oyjord

unread,
Dec 17, 2005, 1:58:46 AM12/17/05
to KML Discussions
Hi all,

I'm new to KML, and looked in the tutorial, but came up empty.

Is there a way to change the text color of the text in the <name> tag under a <placemark> tag?

For instance, now I have:

Code:

<Placemark>
<name>$cacheName ($diff/$terrain)</name>
<styleUrl>defaultStyle</styleUrl>
<Style><IconStyle><Icon><href>http://www.geocaching.com/images/kml/[ICON].png</href></Icon></IconStyle></Style>
<description><!CDATA<a href='http://www.geocaching.com/seek/cache_details.aspx?wp=[GCCODE]'>[DESCRIPTION]</a>, [TYPE] ([DIFF]/[TERRAIN]) by [PLACEDBY]]]></description>
<Point><coordinates>[LON], [LAT]</coordinates></Point>
</Placemark>



but I'd like the $cacheName text to appear in a different color than white. Any tips?

Thanks a bunch,
Oyjord.

ink_polaroid

unread,
Dec 17, 2005, 6:22:07 AM12/17/05
to KML Discussions
You're looking for <LabelStyle>:

Code:
<LabelStyle>
<color>ff0000ff</color>
</LabelStyle>



Documentation is here:
http://www.keyhole.com/kml/docs/webhelp/KeyholeKMLTagReference/_labelStyle_.htm

But unfortunately has some serious typos. We're working on it. The quoted example above colors the label red.

The best way to explore this for yourself is to use the client to create colors etc, save as kml, and look at the kml in a text editor.

oyjord

unread,
Jan 4, 2006, 3:33:10 PM1/4/06
to KML Discussions
Thanks a ton!
Reply all
Reply to author
Forward
0 new messages