PDA

View Full Version : How do I draw a line and put a point at the end



CurtTampa
11-06-2005, 09:45 PM
I create KML files with points, and with lines, I need to draw a line then put the Stick pin at one of the end points.

TIA

araT
11-07-2005, 01:54 AM
Unfortunately you cant draw lines & models unless you have GE Plus, you can see all the differences here (http://earth.google.com/products.html)

T.

CurtTampa
11-11-2005, 07:54 PM
How do I do draw a line with a push pin at the end

araT
11-12-2005, 12:46 AM
Ok, go to the add menu and select "Model" draw your line, then go back to the add menu and select "placemark" and place it where you want :)

T.

CurtTampa
11-12-2005, 11:39 AM
I am creating KML files with a VB program. I was looking for the KML code to do this. I can create two placemarks easy. I need it to be one placemark. The Pin should provide data about the line tracking where 'the pin' has been. If I do it as two place marks, it has two check boxes.

araT
11-12-2005, 01:12 PM
Theres no way to do it as one, you'll have to put them in a folder and use the folder's checkbox to control them :slant:

T.

Stadsman
11-15-2005, 08:36 PM
CurtTampa,

Maybe the attached file will help you a bit further along; it's a kml file with two placemarks and a line in it. Note that the starting and ending points of the line are identical to the placemarks. Maybe you can derive from it's code how to implement it for your project.

The code is:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Folder>
<name>placemarks and line</name>
<open>1</open>
<Placemark>
<name>Placemark 1</name>
<LookAt>
<longitude>-112.4283333313331</longitude>
<latitude>37.41352505410358</latitude>
<range>6480.564394666495</range>
<tilt>1.138783050848691e-011</tilt>
<heading>1.517301318300617</heading>
</LookAt>
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
<Style>
<IconStyle>
<Icon>
<href>root://icons/palette-3.png</href>
<x>128</x>
<y>32</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Point>
<coordinates>-112.4283333313332,37.413525,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Placemark 2</name>
<LookAt>
<longitude>-112.4283173771182</longitude>
<latitude>37.4135278818181</latitude>
<range>226.9781637646387</range>
<tilt>6.665454672693575e-012</tilt>
<heading>1.517311011445451</heading>
</LookAt>
<styleUrl>root://styles#default+icon=0x307</styleUrl>
<Style>
<IconStyle>
<Icon>
<href>root://icons/palette-3.png</href>
<x>128</x>
<y>32</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
</Style>
<Point>
<coordinates>-112.4286285774005,37.41303089291845,0</coordinates>
</Point>
</Placemark>
<Placemark>
<name>Path</name>
<styleUrl>root://styles#default+icon=0x307</styleUrl>
<Style id="khStyle578">
<LineStyle id="khLineStyle582">
<color>ff0000ff</color>
<width>3</width>
</LineStyle>
</Style>
<LineString id="khLineString585">
<tessellate>1</tessellate>
<coordinates>
-112.4283333313332,37.413525,0 -112.4286285774005,37.41303089291845,0
</coordinates>
</LineString>
</Placemark>
</Folder>
</kml>