The HTML of the "GeoWeb"
HTML is the "HTML of the GeoWeb". From Mano Marks:
For a basic Google Maps mashup (or Bing, or Yahoo! Maps too), you need at least HTML, CSS, and JavaScript. More complicated mashups will use KML, GeoRSS, or GeoJSON, maybe Flash instead of JS, and wait. Notice the first one of those technologies, HTML. Still fundamentally, the GeoWeb relies on HTML. Sure, with a GeoWeb browser like Google Earth, you don't need HTML, though you can use it in the description balloons. But most mashups require HTML as the carrier.
Actually, you do still need HTML with Google Earth. Lacking forms or other intrinsic publishing mechanisms, KML is a format for read-only applications. Theoretically, one might put an HTML form in a placemark bubble and use that to modify the state of the resource behind the KML representation. Or javascript to modify the resource via XHR like many of us do with OpenLayers. Unfortunately, Google Earth doesn't surface forms in popups or fully support javascript. We'll have to wait for more convergence between Earth and Chrome, perhaps. Meanwhile, I'm making users hop between Earth and their browser. It's easy enough to cut and paste the placemark's KML text, but imagine what you could do with javascript and DOM-like access to the nodes in a KML doc.
Comments
Re: The HTML of the
Author: Brian Flood
hi sean
as of GE 5.0, you can use iFrames in the HTML balloons to get full access to the browser/DOM. it works well for editing data directly in the GE interface (even though its just a shortcut to what you're doing now)
cheers
brian
Re: The HTML of the
Author: Sean
Thanks for the tip, Brian. Better update, I guess, and get over the itchy feeling that iframes give me.
Re: The HTML of the
Author: Brian Flood
yea, wish I had better solution then iFrames. I remember there was some debate in the GE beta forums about native balloons supporting full html/js/flex and the outcome was a compromise using iFrames. the good part about it was at least you could rely on the balloon content acting in a well-known manner (caching, rendering, js issues etc) since its based on webkit (oddly enough, I think the embedded browser (below the globe) *may* use the machines default browser so you can end up with 2 different caches. go figure.)
in A2E, all the datasource feature resources have a small attribute editor built in that uses this technique for GE/GMaps (or anything really). the other cool part is since the iFrame is a real browser, all of your login/security goo works as it normally would
cheers
brian
Re: DOM-like access to the nodes in a KML doc
Author: Klokan Petr Pridal
Hi,
I just wanted to mention Google Earth API - where you have full access to the DOM of KML documents from JavaScript. Have a look at the documentation: http://code.google.com/apis/earth/articles/domintro.html.
and example of KML DOM manipulation via JavaScript:
http://earth-api-samples.googlecode.com/svn-history/r52/trunk/demos/dom-tree/index.html
Recently this was simplified by Roman Nurik (Google employee) via the Google Earth Utility Library (GEarthExtensions):
http://code.google.com/p/earth-api-utility-library/.
Of course, you need Google Earth Plugin for your web-browser - which is in this moment available for Windows and Mac (so no Linux yet :-().
Re: The HTML of the
Author: Sean
Right, this a good direction, but I can't tie my project to a proprietary plugin. And, again, this underlines how much we need HTML and javascript to complement KML.