LineString, color and width

1,500 views
Skip to first unread message

andrew2...@live.uwe.ac.uk

unread,
Nov 8, 2010, 1:47:45 PM11/8/10
to kml-support-g...@googlegroups.com
I want to change the default colour of the LineString, from blue to red.
At the moment, google maps has changed the colour to red but there is no width. I can see the colour has been changed to red by hovering my mouse over the line, it shows red squares.

I've checked my code with google's KML referrence example, but I can't find what's wrong.
Can anyone help me out, please?

Here's my code:

<Style id="red">
    <LineStyle>
      <color>red</color>
      <width>4</width>
    </LineStyle>
</Style>

<Placemark>
    <name>Twinned</name>
    <description>This line indicates there is a relation between
    Cork and Coventry.
    </description>
    <styleUrl>#red</styleUrl>
    <LineString>   
      <extrude>1</extrude>
      <tessellate>1</tessellate>
      <coordinates>
        -1.512400,52.407101,0 -8.477857,51.897194,0
      </coordinates>
    </LineString>
</Placemark>

andrew2...@live.uwe.ac.uk

unread,
Nov 8, 2010, 1:48:41 PM11/8/10
to kml-support-g...@googlegroups.com

Rossko

unread,
Nov 9, 2010, 12:17:19 PM11/9/10
to KML Developer Support - Getting Started with KML
> <LineString>
> <extrude>1</extrude>
> <tessellate>1</tessellate>
> <coordinates>
> -1.512400,52.407101,0 -8.477857,51.897194,0
> </coordinates>

Altitude is zero.
Where extrude or tesselate are requested, setting an altitude mode is
mandated
http://code.google.com/apis/kml/documentation/kmlreference.html#linestring
Reply all
Reply to author
Forward
0 new messages