- From: Mike Liebhold <mnl@well.com>
- Date: Tue, 06 Mar 2007 10:42:08 -0800
- To: Sean Gillies <sgillies@frii.com>
- CC: georss@lists.eogeo.org, public-xg-geo@w3.org
- Message-ID: <45EDB600.1000304@well.com>
Sean Gillies wrote: >Mike Liebhold wrote: > > >>Carl Reed wrote: >> >>"KML is fundamentally focused on Geographic Visualization - meaning >>visualization of places on the earth - and annotating or describing >>places. " >> >>Carl and epecially Josh >> >>Another question: >>Given that KML annotation -documents- are more web-like than >>geographic, but strangely constrained; Shouldn't Google be invited to >>submit at least those portions of KML for W3C review and >>standardization process? >> >> >> > >Good question. Why not W3C? > >Cheers, >Sean > > > Thanks, Sean, for raising the issue again regarding w3C consideration of KML placemark documents, Ideally a geobrowser like Google Earth would simply ingest and render -any- georss annotated web objects, but so far they are taking much more limited approach: Here are some of the portions of KML in question that might be of interest to W3C xg-geo: from http://earth.google.com/kml/kml_tut.html#placemarks [snip] Placemarks A Placemark is one of the most commonly used features in Google Earth. It marks a position on the Earth's surface, using a yellow pushpin as the icon. The simplest Placemark includes only a <Point> element, which specifies the location of the Placemark. You can specify a name and a custom icon for the Placemark, and you can also add other geometry elements to it. Open the KML Samples <http://code.google.com/apis/kml/documentation/KML_Samples.kml> file in Google Earth and expand the Placemarks subfolder. This folder includes three different types of placemark: /simple/, /floating/, and /extruded/. The KML code for the simple placemark looks like this: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying terrain.</description> <Point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </Point> </Placemark> </kml> The structure of this file breaks down as follows: * An XML header. This is line 1 in every KML file. No spaces or other characters can appear before this line. * A KML namespace declaration. This is line 2 in every KML 2.1 file. * A Placemark object that contains the following elements: o - A /name/ that is used as the label for the Placemark o - A /description /that appears in the "balloon" attached to the Placemark o - A /Point/ that specifies the position of the Placemark on the Earth's surface (/longitude, latitude,/ and optional /altitude/) If you were wondering where the Placemark is, it's right over Google's Building 41, where we developed Google Earth! What users commonly think of as a "placemark" in Google Earth is actually a <Placemark> element with a <Point> child in KML. A Point Placemark is the only way to draw an icon and label in the 3D Viewer of Google Earth. By default, the icon is the familiar yellow pushpin. In KML, a <Placemark> can contain one or more geometry elements, such as a LineString, Polygon, or Model. But only a <Placemark> with a Point can have an icon and label. The Point is used to place the icon, but there is no graphical representation of the Point itself. Descriptive HTML in Placemarks The KML Samples <http://code.google.com/apis/kml/documentation/KML_Samples.kml> file has an example of almost everything you can do with Placemark text. You can add links, font sizes, styles, and colors, and specify text alignment and tables. If you'd like to see the full list, copy and paste the "Descriptive HTML" Placemark example (in the Styles and Markup folder) into a text editor. Auto-Markup in Google Earth (Release 4.0 and later) Google Earth 4.0 has an auto-markup feature that automatically converts text such as /www.google.com/ into active hyperlinks that the user can click. Text inside the <description> tag, the <Snippet> tag, and the <text> element of <BalloonStyle> are all automatically transformed into standard HTTP hyperlinks. You don't need to add the <a href= ...> tags yourself. Using the CDATA Element If you want to write standard HTML inside a <description> tag, you can put it inside a CDATA tag. If you don't, the angle brackets need to be written as entity references to prevent Google Earth from parsing the HTML incorrectly (for example, the symbol *>* is written as *>* and the symbol *<* is written as *<*). This is a standard feature of XML and is not unique to Google Earth. Consider the difference between HTML markup with CDATA tags and without CDATA. First, here's the <description> with CDATA tags: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>CDATA example</name> <description> <![CDATA[ <h1>CDATA Tags are useful!</h1> <p><font color="red">Text is <i>more readable</i> and <b>easier to write</b> when you can avoid using entity references.</font></p> ]]> </description> <Point> <coordinates>102.595626,14.996729</coordinates> </Point> </Placemark> </Document> </kml> And here's the <description> without CDATA tags, so that special characters must use entity references: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>Entity references example</name> <description> <h1>Entity references are hard to type!</h1> <p><font color="green">Text is <i>more readable</i> and <b>easier to write</b> when you can avoid using entity references.</font></p> </description> <Point> <coordinates>102.594411,14.998518</coordinates> </Point> </Placemark> </Document> </kml> [snip]
Received on Tuesday, 6 March 2007 18:43:15 UTC