580 likes | 677 Views
Explore Google Earth User Interface, Placemarks, Clouds, and KML in Google Maps. Learn about HTML, XML tags, XHTML basics, and creating tables. Discover special character codes and advanced web technologies. Deep dive into KML tags for data visualization.
E N D
Interactive Data Visualization Lecture #03 12-Sep-2007 Title Computer Science 767W Fall 2007 Colin Ware Kurt Schwehr
Last class • The Google Earth User Interface • Creating a basic Placemark/Thumbtack
Class #03 • Clouds • KML in Google Maps • HTML/KML detail • Color/Style • Lines
Course time change? • Can we move the class to 1:00-2:20?
Course Web Pages • Google Earth: • http://vislab-ccom.unh.edu/~schwehr/Classes/2007VisCourse • kurt@ccom.unh.edu • Human Perception for Information Display: • http://ccom.unh.edu/vislab/VisCourse/
http://www.barnabu.co.uk/files/kmz/clouds-monthly-sequences-nl.kmlhttp://www.barnabu.co.uk/files/kmz/clouds-monthly-sequences-nl.kml Cloud Demo
If we create the proper URL,KML can appear in google maps • http://maps.google.com/?q=URL • http://maps.google.com/?q=http://vislab-ccom.unh.edu/~schwehr/Classes/2007VisCourse/lectures/02/sunrise.kml
The picture does not work <description> Sunrise over the Chase Ocean Engineering parking lot. <img src="sunrise.jpg”/> </description>
XML • Header - “XML Declaration” • <?xml version="1.0" encoding="UTF-8"?> • XML character encoding • UTF-8 for English characters
Comments • Anything within <!-- --> • Comments do not nest
xmllint can tell us that something is wrong http://xmlsoft.org/
XML Tags • Must be balanced • Start: <atag> • End: </atag> <--- “/” marks the end • Can contain other tags, text, mixed • <atag>some text</atag> • <atag><innertag></innertag></atag> • <a>text1<b>text2</b>text3</a> • Can not mix tags • Wrong: <a><b></a></b>
Empty tags have a shorthand • These are equivalent: • <foo></foo> • <foo/>
Tags can have Attributes • <atag attribute1=“some” attribute2=“thing”></atag> • Attributes are quoted text - termed “value” • Empty tags can also have attributes • <anothertag anumber=“3.1415”/>
Basic XHMTL • <html> - Root node for the document • <body> - Contains the contents of the document • <p> • Headers, <em>, and <strong> • Links • <img> • Tables
HTML versus XHTMLHyperText Markup Language • HTML is SMGL ( Much more complicated than XML) • capitalization does not matter • tags may be unbalanced • XHTML is XML • http://en.wikipedia.org/wiki/Xhtml
XHTML Text Module • http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule
Paragraphs • Each paragraph of text is wrapped in a <p> tag • HTML ignores new lines. Blank lines do not give you a new paragraph.
Headers • <h1> … <h6> provide headers that are progressively smaller
Links • <a href=“URL”>Text or Image</a>
Images • <img src=“URL/>
TablesThe most complicated XHTML that you will do in this class
Table Tags • <table> - defines a table • <th> - table header • <tr> - contains one row • <td> - one table cell within a row
Table Attributes • border=“1” - gives the lines • bgcolor=“orange”
HTML Special Character Codes • There are numeric and text codes for characters • Allows for characters not on the keyboard or things that interfere with HTML or XML. • e.g. “>” can be written “>” or “>” • http://www.ascii.cl/htmlcodes.htm
http://www.ascii.cl/htmlcodes.htm Character codes
This leaves out many HTML features! • CSS - Cascading Style Sheets • Javascript/DHTML • Embedded objects (movies and others) • AJAX • All kinds of server side fun • Servlets • Mod-python/mod-perl • And many, many more
Passing HTML straight through to Google Earth causes trouble!