Google Earth Hacks Forums  

Go Back   Google Earth Hacks Forums > Google Earth > General Discussion

General Discussion Talk about any Google Earth stuff that's not covered in a different section.

Reply
 
Thread Tools Display Modes
Old 11-06-2005, 09:45 PM   #1
CurtTampa
Junior Member
 
Join Date: Sep 2005
Location: Tampa
Posts: 11
Default How do I draw a line and put a point at the end

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
CurtTampa is offline   Reply With Quote
Old 11-07-2005, 01:54 AM   #2
araT
Licensed to Ban
 
araT's Avatar
 
Join Date: Jul 2005
Location: Sydney, Oz
Posts: 1,244
Default

Unfortunately you cant draw lines & models unless you have GE Plus, you can see all the differences here

T.
araT is offline   Reply With Quote
Old 11-11-2005, 07:54 PM   #3
CurtTampa
Junior Member
 
Join Date: Sep 2005
Location: Tampa
Posts: 11
Default ok, Now I got Plus, now what

How do I do draw a line with a push pin at the end
CurtTampa is offline   Reply With Quote
Old 11-12-2005, 12:46 AM   #4
araT
Licensed to Ban
 
araT's Avatar
 
Join Date: Jul 2005
Location: Sydney, Oz
Posts: 1,244
Default

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.
araT is offline   Reply With Quote
Old 11-12-2005, 11:39 AM   #5
CurtTampa
Junior Member
 
Join Date: Sep 2005
Location: Tampa
Posts: 11
Default Not Quite what I needed

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.
CurtTampa is offline   Reply With Quote
Old 11-12-2005, 01:12 PM   #6
araT
Licensed to Ban
 
araT's Avatar
 
Join Date: Jul 2005
Location: Sydney, Oz
Posts: 1,244
Default

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

T.
araT is offline   Reply With Quote
Old 11-15-2005, 08:36 PM   #7
Stadsman
Super Muderator
 
Stadsman's Avatar
 
Join Date: Jul 2005
Location: 52°21'24.37"N, 4°51'13.83"E
Posts: 261
Default

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:
Code:
<?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>
Attached Files
File Type: kml placemarks and line.kml (2.0 KB, 211 views)
__________________

Stadsman
__________________

"Sponges grow in the ocean. That just kills me. I wonder how much deeper the ocean would be if that didn't happen."
-- Steven Wright
Stadsman is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:17 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.