KML Balloons in Google Earth - starting with version 5.0 - support HTML, CSS, and almost full JavaScript. This can be a great tool for developers looking to add rich content and interactivity into their KML files.
However, it’s not always obvious how to debug that KML content. Google Earth doesn’t have a full set of tools like Chrome Developer Tools. However, it does allow you to view console output, so console.log() output, as well as errors that would normally appear in the Chrome console or Firebug will appear in the console instead. Note, Google Earth does not allow the presentation of system dialogs (namely the functions alert, confirm, and prompt).
Here’s some quick tips on how to get it to work:
Here's a screenshot from Mac OS X:
Balloon content is rendered by WebKit, and Google Earth currently supports the equivalent of Safari 4.0.4 (which is WebKit-based). If you want to know if a particular JavaScript or CSS feature is supported, one option is to search for it on http://caniuse.com/.
[Cross posted from the Google Analytics Blog]
Does your organization have several websites, each serving a particular geographic region? If so you know how challenging it is to analyze the data across these regions in a meaningful way.
Visualizations can help, but they can be difficult to design. Newland communities, a developer of residential and urban home communities, manages numerous web properties for each community and is no stranger to these challenges. To address them, Newland used the query tool from ShufflePoint. The tool enabled the combination of data from Google Analytics and Google Earth, allowing Newland to visualize the data in new ways.
ShufflePoint implemented a pilot project after discussing the idea with Chief Ingredient and their client Newland Communities. Their goal: deal with some of the problems associated with clarifying large amounts of data in a visually appealing manner. The outcome of the project was an integration of Google Analytics data with Google Earth.
Using the Google Analytics API, the ShufflePoint query tool extracts metrics by location from Google Analytics for multiple Newland Communities web properties and creates KML representations viewable in Google Earth. The mashup provides advanced visual reporting on location based campaigns, showing their effect on pageviews, and highlighting any anomalies requiring further investigation. Additionally, the visualization is a great fit for promotional videos, or digital signage needs.
“ShufflePoint uses almost every feature and capability of the Google Analytics API. The API has all of the characteristics that a developer could hope for, including great performance, correct semantics, OAuth for authentication, and good community support. The Google Earth based application has given ShufflePoint recognition for doing innovative and challenging things with Google Analytics. This has been beneficial for promoting ShufflePoint’s offerings.” Chris Harrington, CTO
The ShufflePoint application can be found on the ShufflePoint website.
If you’re interested in developing solutions for the Google Analytics platform, visit Google Analytics Developer Program.
This session at Google I/O demonstrated how developers can take advantage of new and little known GIS capabilities in all of our geo services.
We started out showing some of the GIS capabilities in Google Maps API, which amongst other features, lets you calculate distances and angles and overlay map tiles in arbitrary projections.
Moving onto some new and upcoming products, we showed off some of the capabilities of Google Earth Builder, a new platform to manage and publish large amounts of raster and vector GIS data.
In the world of data visualization, previous sessions had showed off new styling features for Fusion Tables. In this session, we showed how you can enable spatial queries on your data, displaying maps and statistics for the closest set of features to a location, or all features within an arbitrary radius.
Google Earth Builder is not the only new product that provides access to our infrastructure for working with large GIS datasets - we also talked about Google Earth Engine. This Google.org project is designed to help scientists easily access massive archives of satellite imagery, and run image analysis and other algorithms on the data within Google’s datacenters. Complex analyses that might take months or years to run on a single machine can now be completed in hours or minutes.
Finally, we showed off some ways you can integrate open source technology, and finished off the session with Brian Flood from Arc2Earth, who demonstrated a great example of the kind of GIS services that developers can build using Google’s Geo API’s.
Check out the video to see for yourself, and thanks for reading our Geo API’s Summer Learning Series.
Posted by Josh Livni, Geo Developer Relations Team
The Keyhole Markup Language (KML) is an open standard for geographic data presentation. There are over one billion KML files on the web, and yet the vast majority of these files are points on a map.
In High Performance KML for Maps and Earth, Sean Askay and I covered advanced techniques for using KML in Google Earth and the Earth API, as well as introduced other Google platforms that support KML. Our hope is that developers will discover the power of using KML on Google’s platform.
Some of the topics we discussed during our talk:
An Introduction to KML
Advanced data visualization techniques
We demonstrated two new animation techniques using under-utilized KML tags that make for powerful data visualizations.
First we showed a time-animated thematic map of U.S. Census data using the <gx:altitudeOffset> and <gx:AnimatedUpdate> tags to animate the data using a KML Tour. See this post on unchartable.com more information.
We also demonstrated also a proof of concept for pushing near real-time GPS data updates to Google Earth via a <NetworkLink> that uses <NetworkLinkControl> and <Update> tags to inject new location data into a pre-existing GPS track <gx:MultiTrack>.
You can download this KML file to see these two techniques in action and the other KMLs demonstrated during the talk.
Developer environment
People often ask us about a developer environment for creating KML, so we covered various options. We looked at editors, validators, and libraries, including the open source library PyKML.
KML on other platforms
We showed how to use KML in the Google Maps API and Google Fusion Tables.
So check out the slides and the video and start bringing the power of KML to your presentations.
KML and Earth had a really great year in 2010. Toward the end of the year, we added a bunch of new stuff, and wanted to recap it to let you know what we’ve been up to.
Google Earth 6.0 was launched on Nov 29th, and with it came a whole host of new features. Trees, a new Street View mode in Earth, new measuring tools. But along with the product features, it came with some new KML extensions as well:
Of course you can also check out the KML reference, check for things marked New!, and the Earth API release notes for more info.
Back in December of 2009, five leading scientists from the American Geophysical Union trekked to the remote Google office in downtown San Francisco. Lost until now, the video of their presentations have resurfaced. So, for the first time ever, we present, the Lost Archives of the Google Geo Developers Series
Jeffrey Cardille of Universitie de Montreal discusses GeoSearch, a new virtual globe application for the submission, storage, and sharing of point-based ecological data.
Thijs Damsma of Deltares discusses his use of KML to visualize coastal data.
Ross Beyer of NASA and SETI discusses his work visualizing Mars data and imagery using Google Earth.
Tyler Erickson of Michigan Tech Research Institute discusses his tools for to visualizing 4-D atmospheric carbon monitoring data using KML and Google Earth
Yaxing Wei of Oak Ridge National Lab discusses his Spatial Data Access Tool which enables visualization and access of geospatial data using OGC services and Google Earth.
The release of Google Earth 5.2 had a lot of new features, so many that we had to write three different blog posts just to cover it all. Well, OK, four with this one. One of the most exciting features from a developer standpoint is the new KML extension, <gx:Track>.
We wanted a better way to represent movement on and above the globe. Time animation works well, but from a KML standpoint it required very bulky files. In order to “move” a <Point>, you created a new <Placemark> for each time segment. Your <Point> didn’t actually move, it merely was replicated at a different place. This made animating your path rather cumbersome. Instead, we wanted a smoother experience, and one that allowed you to truly animate a <Geometry>. So, we created <Track>. To get a real sense of the power of <Track>, check out this video.
As you can see, a <Model> (a <Model> is a <Geometry> in KML) of an airplane moves smoothly along the <Track>. Let’s take a look at some KML:
<Placemark><name>My first track</name><styleUrl>#mytrackstyle</styleUrl><gx:Track><altitudeMode>absolute</altitudeMode><when>2010-04-07T23:30:55Z</when><when>2010-04-07T23:31:13Z</when><when>2010-04-07T23:31:32Z</when><when>2010-04-07T23:31:52Z</when><when>2010-04-07T23:32:11Z</when> ... <gx:coord>-83.671639 1.675732 7.827881000000001</gx:coord><gx:coord>-83.67233299999999 1.675678 4.943848000000001</gx:coord><gx:coord>-83.672904 1.67574 3.982666</gx:coord><gx:coord>-83.67346499999999 1.675781 4.463257</gx:coord><gx:coord>-83.67400600000001 1.675855 3.501953</gx:coord> ...<Model id="model_2"> ... <Link> <href>/Users/mmarks/Documents/track.kmz/files/mymodel.dae</href> </Link></Model></gx:Track></Placemark>
Track is a parallel array. The first <when> element matches the first <gx:coord> element, the second with the second, and so forth. The <when> element identifies the point on the time slider, and the <gx:coord> the matching location. Google Earth draws a line between each position visible in the time slider. Track also supports <gx:angles>, which allows you to define the heading of a model at any point along the way. If not defined in <gx:angles>, Google Earth will change the orientation of the Model based on the direction between the current position and the one previous.
Since you’re only creating one Track element, instead of re-creating a bunch of <LineString> elements for every time segment, your KML files will be much smaller. In fact, the more coordinates you have, the more benefit you’ll see from it.
One more feature that is really compelling is that you can add <gx:SimpleArrayData> elements to <SchemaData>. <gx:SimpleArrayData> allows you to add a matching array of your own data. In the sample posted here heart rate, cadence and power are added to each point, and when Elevation Profile is turned on in Google Earth, it allows you to view that data as well, as you can see below.
Mano Marks, Geo APIs Team
When we first announced the Google Maps Data API in May, we were excited to provide developers with free scalable hosting of geographic content. The idea was simple: to create an awesome maps mashup, you focus on creating a great user experience and Google will provide scalable hosting and bandwidth. Moreover, your data should be accessible from any platform (like desktop, iPhone, or Android) using your language of choice (including JavaScript, Python, Java, or Objective-C).
Today we're launching several exciting new features based on all the great feedback we've gotten from developers. First, we're adding geospatial and attribute search to your maps. To see these features in action, play around with this College Finder demo (you can download and modify the source code here). I created a Google My Map consisting of approximately 3000 U.S. 4-year colleges, and wrote a JavaScript app to search over this map (with no need to run my own server or database!).
Using the new search features, you can easily request "all colleges within 5km of San Francisco" and apply attribute filters like "[Type:public]". You can also sort the results by proximity to a point (in this case, the center of the map). The results are updated whenever the map is dragged or zoomed, or when the search criteria change.
In addition to search, many developers have requested the ability to enable API access to a public map without requiring users to be signed into a Google account. We've also enabled this today: you can indicate (using the API) that you would like a map to be accessible by others via the API. You can also programmatically control access to the maps you own, by making them public/private or adding specific collaborators. Our official docs will be updated soon but, in the meantime, check our forum for updates about this.
To get started writing your next awesome geo app, you can download and modify our sample code, or refer to our documentation. We look forward to seeing all the great collaborative mashups, store locators, and mobile apps you'll come up with.
If you have questions or feedback, or would like to tell us about your new creation, please visit our developer forum, tweet about #mapsdata, or file a feature request. We have some other great features on the way, so stay tuned and keep mapping!
We're really excited to announce two upcoming hackathons for our Google Geo APIs. The first will be held in New York City on November 20th followed by a second one in Mountain View on December 15th. This will be a great learning opportunity for any developer interested or currently involved in building Geo-enabled applications using our APIs. Come join us for a great session where you'll be able to hack away on your own projects alongside our engineers who'll be readily available to provide support.Below is a list of the various Google Geo APIs you'll learn about:
Registration for these events are completely free, and space is limited. Reserve your spot now using the following links below!
Bring your laptops, your brains, and we'll see you soon!
Converting GIS Vector Data to KML: This tutorial walks you through the basics of converting GIS vector data to KML using the OGR open source library.
Creating super-overlays with gdal2tiles: This tutorial walks you through the basics of creating a super-overlay, a set of ground overlays that use region-based NetworkLinks, using the open source gdal2tiles utility.
And of course, if you want to learn more about these utilites or other Google Geo APIs, come to our San Francisco hackathon!
Posted by Mano Marks, Geo APIs team
Calling all Bay Area coders! We've just finalized another hackathon for late September! On September 24th, 2009, from 1:30 to 8, Google will host a hackathon for our Geo APIs in our San Francisco office. At the hackathon, Google engineers will give one or two API overview presentations and then will be on hand to answer all your geo related questions. You can work on suggested codelabs, or just bring your own project and we'll lend you a hand.
The hackathon will cover the following APIs:
Space is limited, so register now! And remember, this will be a code-heavy event, so bring your laptop and come ready to code!
Posted by Roman Nurik, Geo APIs team
So bring your laptops, and your brains, and be prepared to code.
Space is limited, so register now!
Posted by Taj Campbell, Google Maps Data API team
March 5th, from 3-9pm, Google will be hosting a Google Geo APIs hackathon at our Manhattan offices, 111 8th Avenue at 15th street in Manhattan. Join us for some hacking around on Google Geo APIs. Work on our learning materials, or work on your own projects. There will presentations on new features in the APIs, and plenty of Geo Googlers around to help you with your technical questions. In particular, we will be helping people with the Google Maps API, the Google Earth API, and KML.
To register, click here. Space is limited, so you may want to register now.
You've probably already read about this week's release of Google Earth 5.0 and its exciting new features, including Historical Imagery, Touring, Ocean, and Mars. As is usually the case for new features in Earth, we wanted to add representations for some of them to KML. In the past this was done by simply adding new elements to the KML specification. But that's no longer an option for us, since KML is no longer controlled by Google, having been released as an open standard by the Open Geospatial Consortium.
So what's an application provider to do? Fortunately, both Google and the OGC had the foresight to anticipate that innovation would continue to drive the standard forward, so OGC KML includes a standardized mechanism that enables any group to extend KML within their own XML namespace. Google Earth 5.0 uses this extension mechanism to add to KML in a standards-compliant way. We've also added some new documentation to guide you in understanding these new KML constructs:
For those who are interested in precise XML validation of the new elements, please see Google's new KML 2.2 extensions XSD, which is the formal standards-compliant description of their syntax.
As always, you can find out more information or ask questions in the KML Developer Forum.
Recently, we released three new resources for KML and the Google Earth API:
OK, it's not exactly a manual, actually a handbook, The KML Handbook by Josie Wernecke. Josie is the Google tech writer who wrote the KML 2.1 and 2.2 documentation, and also helped write the KML 2.2 OGC Specification. So she knows what she's talking about!
The KML Handbook is the most complete treatment of KML in print. It explains all the various elements and features of KML. It also examines both well known topics like Regionation, and lesser known topics like View Based Refresh. It is also the only book on KML officially endorsed by Google.
The book is available for pre-sale from Amazon and O'Reilly, and should be available for immediate purchase soon. So for all those would-be Santa Trackers, and anyone else in the geographic world, you now have a great holiday gift.
Howdy, everyone! I'm sure that after reading countless posts on the Geo Developers blog and writing tons of code using Google Geo APIs and other development kits, you're all experts with KML. I mean, you obviously know that to create a polygon, you simply need a <Placemark>, with a <Polygon> containing an <outerBoundaryIs> consisting of a <LinearRing> with a <coordinates> element which contains a series of (longitude, latitude, altitude) tuples... and, you didn't forget that you need to repeat your first coordinate tuple again at the end, right? Heh, well maybe not. For those of you can recite the entire OGC KML v2.2 schema from memory in one go, you can probably stop reading.
To the 99.9% of us who don't know everything there is to know about KML, and have been looking for a way to explore this curious little language, I present a new learning and exploration tool called the KML Interactive Sampler. One caveat, though -- since the sampler uses the Earth Browser Plug-in and API, the Earth view will currently only work on Windows.
Mac folks... be patient, a seriously awesome Mac version of the plugin is in the works!
Here are a few screenshots of the sampler to whet your appetite:
So, if you're just starting out with KML, or brushing up on your existing skills or maybe just looking to play around with a cool new toy, definitely check out the new sampler. If you have any trouble using it, feel free to comment in the Getting Started with KML support forum.
Thanks, and enjoy!
Give us feedback in our Product Forums.