Results 1 to 7 of 7

Thread: How do I draw a line and put a point at the end

  1. #1
    Junior Member
    Join Date
    Sep 2005
    Location
    Tampa
    Posts
    14

    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

  2. #2
    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.

  3. #3
    Junior Member
    Join Date
    Sep 2005
    Location
    Tampa
    Posts
    14

    Default ok, Now I got Plus, now what

    How do I do draw a line with a push pin at the end

  4. #4
    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.

  5. #5
    Junior Member
    Join Date
    Sep 2005
    Location
    Tampa
    Posts
    14

    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.

  6. #6
    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.

  7. #7
    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 Attached Files

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •