8
What is KML? What is KML? Keyhole Markup Language Keyhole Markup Language Form of XML that is used in google Form of XML that is used in google earth to mark points. earth to mark points. Can create camera angles Can create camera angles Writes HTML descriptions of features Writes HTML descriptions of features and allows hyper-linking and image and allows hyper-linking and image embedding embedding http://www.keyhole.com/kml/ http://www.keyhole.com/kml/ kml_tut.html kml_tut.html

What is KML?

  • Upload
    gella

  • View
    22

  • Download
    0

Embed Size (px)

DESCRIPTION

What is KML?. Keyhole Markup Language Form of XML that is used in google earth to mark points. Can create camera angles Writes HTML descriptions of features and allows hyper-linking and image embedding http://www.keyhole.com/kml/kml_tut.html. Different uses. Can be used to form placemarks - PowerPoint PPT Presentation

Citation preview

Page 1: What is KML?

What is KML?What is KML?

Keyhole Markup LanguageKeyhole Markup Language Form of XML that is used in google earth Form of XML that is used in google earth

to mark points.to mark points. Can create camera anglesCan create camera angles Writes HTML descriptions of features and Writes HTML descriptions of features and

allows hyper-linking and image allows hyper-linking and image embedding embedding

http://www.keyhole.com/kml/http://www.keyhole.com/kml/kml_tut.htmlkml_tut.html

Page 2: What is KML?

Different usesDifferent uses

►Can be used to form Can be used to form placemarksplacemarks

►Can be used to form ground Can be used to form ground overlaysoverlays

►Can be used to from Can be used to from paths/directions from one paths/directions from one location to another. location to another.

Page 3: What is KML?

Placemark code examplePlacemark code example<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.0"> <kml xmlns="http://earth.google.com/kml/2.0"> <Placemark> <Placemark>

<description>Tethered to the ground by a customizable tail</description> <description>Tethered to the ground by a customizable tail</description> <name>Tethethed placemark</name> <name>Tethethed placemark</name> <LookAt> <LookAt>

<longitude>-122.0856375356631</longitude> <longitude>-122.0856375356631</longitude> <latitude>37.42240551227282</latitude> <latitude>37.42240551227282</latitude> <range>305.8880792294568</range> <range>305.8880792294568</range> <tilt>46.72425699662645</tilt> <tilt>46.72425699662645</tilt> <heading>49.06133439171233</heading> <heading>49.06133439171233</heading>

</LookAt> </LookAt> <visibility>0</visibility> <visibility>0</visibility>

<Style> <Style> <IconStyle> <IconStyle>

<Icon> <href>root://icons/palette-3.png</href> <Icon> <href>root://icons/palette-3.png</href> <x>96</x> <x>96</x> <y>160</y> <y>160</y> <w>32</w> <w>32</w> <h>32</h> <h>32</h> </Icon> </Icon>

</IconStyle> </IconStyle> </Style> </Style> <Point> <Point>

<extrude>1</extrude> <extrude>1</extrude> <altitudeMode>relativeToGround</altitudeMode> <altitudeMode>relativeToGround</altitudeMode> <coordinates>-122.0856204541786,37.42244015321688,50</coordinates> <coordinates>-122.0856204541786,37.42244015321688,50</coordinates>

</Point> </Point> </Placemark> </Placemark> </kml> </kml>

Page 4: What is KML?

Example code for Ground Example code for Ground overlayoverlay

<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.0"> <kml xmlns="http://earth.google.com/kml/2.0">

<GroundOverlay> <GroundOverlay> <description>Overlay shows Mount Etna erupting on July 13th, 2001.</description> <description>Overlay shows Mount Etna erupting on July 13th, 2001.</description> <name>Large-scale overlay on terrain</name> <name>Large-scale overlay on terrain</name> <LookAt> <longitude>15.02468937557116</longitude> <LookAt> <longitude>15.02468937557116</longitude> <latitude>37.67395167941667</latitude> <latitude>37.67395167941667</latitude>

<range>30350.36838438907</range> <range>30350.36838438907</range> <tilt>58.31228652890705</tilt> <tilt>58.31228652890705</tilt> <heading>-16.5581842842829</heading> <heading>-16.5581842842829</heading>

</LookAt> <visibility>0</visibility> </LookAt> <visibility>0</visibility> <Icon> <href>http://bbs.keyhole.com/ubb/z0302a1700/etna.jpg</href> </Icon> <Icon> <href>http://bbs.keyhole.com/ubb/z0302a1700/etna.jpg</href> </Icon>

<LatLonBox id="khLatLonBox751"> <LatLonBox id="khLatLonBox751"> <north>37.91904192681665</north> <north>37.91904192681665</north> <south>37.46543388598137</south><south>37.46543388598137</south> <east>15.35832653742206</east><east>15.35832653742206</east><west>14.60128369746704</west> <west>14.60128369746704</west> <rotation>0</rotation> <rotation>0</rotation>

</LatLonBox> </LatLonBox> </GroundOverlay> </GroundOverlay>

</kml> </kml>

Page 5: What is KML?

Allows descriptive HTML in Allows descriptive HTML in placemarksplacemarks

► <description> <description> <![CDATA[ <h1>CDATA Tags are <![CDATA[ <h1>CDATA Tags are

important!</h1> important!</h1> <p><font color="red">Text is <i>more <p><font color="red">Text is <i>more

readable</i> readable</i> and <b>easier to write</b> when and <b>easier to write</b> when you can avoid you can avoid using entity references.</font>using entity references.</font>

</p> ]]> </p> ]]> </description> </description>

► <description> <description> <h1>CDATA Tags are important!</h1> <h1>CDATA Tags are important!</h1> <p><font color="red">Text is <i>more readable</i> and <p><font color="red">Text is <i>more readable</i> and <b>easier to write</b> when you can avoid using entity <b>easier to write</b> when you can avoid using entity references.</font>references.</font></p> </p>

</description> </description>

Page 6: What is KML?

ToolsTools

►One tool that can be used to create One tool that can be used to create your map is your map is mapbuildermapbuilder..

Page 7: What is KML?

Getting the codeGetting the code

►Mapbuilder creates the code Mapbuilder creates the code for you.for you.

►Copy and paste it and save as Copy and paste it and save as html file timehtml file time

►Publish it to webspace.Publish it to webspace.

Page 8: What is KML?

ExercisesExercises

1.1. Go to Go to www.mapbuilder.netwww.mapbuilder.net and and created a user account.created a user account.

2.2. Created at least 2 placemarks on Created at least 2 placemarks on your map. Make on of them your your map. Make on of them your current address and the other can be current address and the other can be whatever you want.whatever you want.