200 likes | 346 Views
Beginning KML. Looking at Data with Google Earth. Review: XML, HTML. Data Descriptive data vs. List of data XML Tags, Attributes Opening/Closing tags HTML XML Tags for the web. Look at Websites. Let’s look at your websites Any questions? Let’s look at some sites online!
E N D
Beginning KML Looking at Data with Google Earth
Review: XML, HTML • Data • Descriptive data vs. List of data • XML • Tags, Attributes • Opening/Closing tags • HTML • XML Tags for the web
Look at Websites • Let’s look at your websites • Any questions? • Let’s look at some sites online! • Google Chrome -> Inspect Element
Before KML • Let’s Check Google Earth! • Is it on the computers? • If not, let’s download it! • Google Earth can be put into a web site!
KML Basics • Points – Also called Placemarks • Paths • A list of points
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates> 126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Creating a KML Point <?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Placemark> <name>My SNU Office</name> <description>Where I code</description> <Point> <coordinates>126.949273,37.458426</coordinates> </Point> </Placemark> </kml>
Create Your own Placemark! • Find a Longitude and Latitude using Google Earth
Creating a KML Path • We will need to create a list of: • Longitude • Latitude • Elevation • First an Example
Looking at Code • We will make our own Path • Use Google Earth to create a list of points • Then put them into a KML file, and load it into Google Earth!
<?xml version="1.0" encoding="UTF-8"?> <kmlxmlns="http://www.opengis.net/kml/2.2"> <Document> <name>My Walking Path</name> <description>Examples of paths.</description> <Style id="yellowLineGreenPoly"> <LineStyle> <color>7f00ffff</color> <width>4</width> </LineStyle> <PolyStyle> <color>7f00ff00</color> </PolyStyle> </Style> <Placemark> <name>My Route to the Bus</name> <description>Transparent green wall with yellow outlines</description> <styleUrl>#yellowLineGreenPoly</styleUrl> <LineString> <extrude>1</extrude> <tessellate>1</tessellate> <altitudeMode>absolute</altitudeMode> <coordinates> 126.949421,37.458879,96 126.953857,37.454169,161 <!-- Many points were deleted for space --> 126.954024,37.454186,165 </coordinates> </LineString> </Placemark> </Document> </kml>
Next Week • I want to look at embedding Google Earth with KML files on a website. • What would you like to do? • Can your phone record your GPS location and path? • We can do cool stuff with this!