<extrude> kml tag - how to control color and opacity?

2,338 views
Skip to first unread message

radek

unread,
Jul 6, 2010, 9:40:19 AM7/6/10
to KML Developer Support - Getting Started with KML
Hi all,

When using <extrude> and <altitudeMode> tags in kml, like in example
from reference:

<Placemark>
<name>extruded</name>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>
-122.364167,37.824787,50 -122.363917,37.824423,50
</coordinates>
</LineString>
</Placemark>

you get grey, opaque shape under your feature.

Is there a way of controling colour and opacity of this grey area?

Maarten L

unread,
Jul 8, 2010, 6:34:20 PM7/8/10
to KML Developer Support - Getting Started with KML
This will give you yellow lines with green walls:

<Style id="yellowLineGreenPoly">
<LineStyle>
<color>7f00ffff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Placemark>
<name>Absolute Extruded</name>
<description>Transparent green wall with yellow outlines</
description>
<LookAt>
<longitude>-112.2643334742529</longitude>
<latitude>36.08563154742419</latitude>
<altitude>0</altitude>
<heading>-125.7518698668815</heading>
<tilt>44.61038665812578</tilt>
<range>4451.842204068102</range>
</LookAt>
<styleUrl>#yellowLineGreenPoly</styleUrl>
<gx:balloonVisibility>1</gx:balloonVisibility>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates>
-112.2550785337791,36.07954952145647,2357
-112.2549277039738,36.08117083492122,2357
-112.2552505069063,36.08260761307279,2357
-112.2564540158376,36.08395660588506,2357
-112.2580238976449,36.08511401044813,2357
-112.2595218489022,36.08584355239394,2357
-112.2608216347552,36.08612634548589,2357
-112.262073428656,36.08626019085147,2357
-112.2633204928495,36.08621519860091,2357
-112.2644963846444,36.08627897945274,2357
-112.2656969554589,36.08649599090644,2357
</coordinates>
</LineString>
</Placemark>

(example from http://code.google.com/apis/kml/documentation/KML_Samples.kml)

radek

unread,
Jul 13, 2010, 1:27:43 PM7/13/10
to KML Developer Support - Getting Started with KML
Thanks Maarten!
> (example fromhttp://code.google.com/apis/kml/documentation/KML_Samples.kml)
Reply all
Reply to author
Forward
0 new messages