I've been working with NASA WorldWind and Google Earth. I'm using a KML placemark for the icon, and I'm hoping to replicate a Header/Leader Line in KML. I want a leader line similar to how the DIRECTION_OF_MOVEMENT line works in WorldWind for it's implementation on 2525 symbology. Basically, the line indicates the direction that the object is moving in and it stays pointing towards that heading no matter the orientation of the map as shown by the black line in the attached screenshot. How can I replicate this using KML in Google Earth?
KML Direction of Movement Line
1.2k views Asked by mainstringargs At
2
There are 2 answers
2
On
What about using a custom floating place-mark coupled with a 3D track?
See the NASA Worldwind reference.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<!-- Icon -->
<Style id="tactical_symbol_placemark">
<IconStyle>
<scale>4</scale>
<Icon>
<href>http://i.imgur.com/EEhQcPj.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<styleUrl>#tactical_symbol_placemark</styleUrl>
<Point>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-114.19327,51.4292695,6000</coordinates>
</Point>
</Placemark>
<!-- Line -->
<Style id="track_line">
<LineStyle>
<color>FF000000</color>
<width>5.0</width>
</LineStyle>
</Style>
<Folder>
<name>tactical_symbols</name>
<Placemark>
<name>testing-Placemark-2</name>
<styleUrl>#track_line</styleUrl>
<LineString>
<extrude>false</extrude>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates>-114.19827,51.279256,6000 -114.18827,51.579283,6000</coordinates>
</LineString>
</Placemark>
</Folder>
</Document>
</kml>
Sorry I can't ask for clarification in comments (I don't have enough reputation). I'm assuming that you are looking for a way to enter a heading and have Google Earth automatically point something in that direction, because currently to draw that line you have to calculate start and end coordinates for each heading line that you want to put down.
If that is the case, the only place I found that allowed me to specify heading was IconStyle. This is how I did it:
Here is an example implementation below: