New KML Interactive Sampler
October 14th, 2008 | Published in Google Maps
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
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:
The sampler consists of a four important sections:- The sample list on the left contains a variety of predefined KML samples, organized hierarchically by topic (i.e. 'Lines and Paths', 'Polygons', etc.) Clicking a sample in the list will load the KML contents into the editor and display the KML in the Earth preview window (see below).
- The instructions and useful links panel at the top contains instructions and other miscellaneous information about the currently loaded sample, as well as relevant links to the KML reference.
- The source editor is the highlight of the sampler. Here, you can make local changes to the sample code and see how the new code looks in the Earth preview by clicking the 'Update Earth' button. And, you can even start a new KML document from scratch once you're ready. The editor has built-in syntax highlighting, so you'll be visually warned if you have an incorrect end tag somewhere. Many thanks to the developer(s) of CodeMirror for the outstanding text editor component.
- And finally, the Earth preview, is an instance of the Google Earth Browser Plug-in that shows you the hard-earned results of your KML code.
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!