<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>distriqt // labs &#187; google-maps</title>
	<atom:link href="http://labs.distriqt.com/tag/google-maps/feed" rel="self" type="application/rss+xml" />
	<link>http://labs.distriqt.com</link>
	<description>flash platform &#38; digital development australia</description>
	<lastBuildDate>Fri, 27 Jan 2012 00:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Schools Disaster Mapper</title>
		<link>http://labs.distriqt.com/post/767</link>
		<comments>http://labs.distriqt.com/post/767#comments</comments>
		<pubDate>Tue, 10 Jan 2012 23:27:41 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[kml]]></category>
		<category><![CDATA[mashups]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[xmlrpc]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=767</guid>
		<description><![CDATA[The Disaster Mapper - An interactive Resource for Schools is a project for the Attorney-General's Department, Australian Emergency Management Institute. The aim of the project was to provide an educational resource aimed at school students for investigating Australian natural disasters throughout history. It was developed in 2009 but has just been released to the public. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F767"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F767&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The Disaster Mapper - An interactive Resource for Schools is a project for the Attorney-General's Department, Australian Emergency Management Institute. The aim of the project was to provide an educational resource aimed at school students for investigating Australian natural disasters throughout history.</p>
<p>It was developed in 2009 but has just been released to the public.</p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_3.png" rel="shadowbox[sbpost-767];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_3-600x444.png" alt="" title="agd_disastermapper_screen_3" width="600" height="444" class="size-medium wp-image-777" /></a><br />
<span id="more-767"></span></p>
<p>This project made use of the latest Flash technologies with the Google Maps API to provide an interactive map where users could navigate and search disaster information by time, location, disaster types and keywords.</p>
<p>The application uses a very simple series of navigational elements. A series of large buttons allows the user to select the disaster categories of interest and a timeline allows the user to limit the time period displayed. The disasters matching these two filters are then displayed on the map along with overview information of the selected disaster categories in the information panels on the left.</p>
<p>Media associated with each disaster (including images, flv, youtube, viemo, mp3 and other media types) can be viewed either in quick view in the information panels or in the detail overlay.</p>
<p>The system also supported and included additional data such as population, temperature, rainfall and specific high-risk disaster areas which could be overlaid on the map.</p>
<p>The result is a very easy-to-use, interesting website and something suitable for the target audience of school students.</p>

<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_1.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_1'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_1-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_1" title="agd_disastermapper_screen_1" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_2.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_2'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_2-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_2" title="agd_disastermapper_screen_2" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_3.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_3'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_3-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_3" title="agd_disastermapper_screen_3" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_4.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_4'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_4-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_4" title="agd_disastermapper_screen_4" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_5.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_5'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_5-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_5" title="agd_disastermapper_screen_5" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_6.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_6'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_6-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_6" title="agd_disastermapper_screen_6" /></a>
<a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_7.png' rel='shadowbox[sbalbum-767];player=img;' title='agd_disastermapper_screen_7'><img width="150" height="150" src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_7-150x150.png" class="attachment-thumbnail" alt="agd_disastermapper_screen_7" title="agd_disastermapper_screen_7" /></a>

<p>Making use of some extra available time, distriqt also developed an additional component for the CMS which allowed an administrator to directly edit overlay data on top of a Google Map, using a standard data format (KML). This allowed the client to create more meaningful and suitable overlay information for the website such as risk areas, temperature, population and rainfall data.</p>
<p><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2012/01/agd_disastermapper_screen_7-541x450.png" alt="" title="agd_disastermapper_screen_7" width="541" height="450" class="size-medium wp-image-793" /></p>
<p>The project was delivered on-time and on-budget, and has been well-received by the client, schools, and educators - all feedback has been very positive.</p>
<p>See the site <a href='http://disastermapper.ema.edu.au/' target='_blank'>here</a>.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/767"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/767/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KML Loader Update</title>
		<link>http://labs.distriqt.com/post/577</link>
		<comments>http://labs.distriqt.com/post/577#comments</comments>
		<pubDate>Sun, 19 Jun 2011 11:53:42 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=577</guid>
		<description><![CDATA[So as many people know, I've been promising an update to the KML Loader for a while now, and even to the point where I've had some local revisions and haven't had the time to check them in (I know, I know, bad practice!) The major update has been to enable the ability to load [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F577"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F577&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>So as many people know, I've been promising an update to the KML Loader for a while now, and even to the point where I've had some local revisions and haven't had the time to check them in (I know, I know, bad practice!)</p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/kmlloader_groundoverlay.png" rel="shadowbox[sbpost-577];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/kmlloader_groundoverlay.png" alt="" title="KML Loader showing a Ground Overlay" width="580" height="352" class="aligncenter size-full wp-image-580" /></a></p>
<p>The major update has been to enable the ability to load linked assets. Initially this just extends to ground overlays and custom icons, but now that I have the structure setup to do this I'll be able to add in linked files and styles easily. </p>
<p><span id="more-577"></span></p>
<p>Other updates include a series of bug fixes, features with multiple geometries now load in correctly and I've updated the utility library to correctly parse the newer OGC KML namespace.</p>
<p>Some things to note:</p>
<ul>
<li>I've added a trunk directory to keep the main head revision separate from the tag tree</li>
<li>I've removed the included version of the google maps utility library. I've committed in some changes to this library so I didn't want to have to maintain it in two places, so you'll now have to go to the google maps utility library on google code <a href="http://code.google.com/p/gmaps-utility-library-flash/" target="_blank">here</a> (I'll package it all up at the end of this post as well).</li>
<li>I've tagged the previous version of the library if you wish to keep using it, you'll find it at: <code>http://svn.distriqt.com/public/trunk/gmaps/tags/R20101004_gmaps_utils_v1.0</code></li>
<li>I've used the <a href="https://github.com/arthur-debert/BulkLoader" target="_blank">BulkLoader</a> by Arthur Debert and have included it in the repository. This is used to load all the linked assets.</li>
</ul>
<p>The functionality should be exactly the same as the previous version, so you can still refer to the post on <a href="http://labs.distriqt.com/post/421">interactions</a>, about the <a href="http://labs.distriqt.com/post/251">SimpleKMLLoader</a> and the initial post about the <a href="http://labs.distriqt.com/post/164">KmlLoader</a>. </p>
<p>The major change is that you now need to grab the gmaps utility library separately and put both libraries in your source tree. </p>
<p>
<pre>
svn co http://svn.distriqt.com/public/trunk/gmaps/trunk/ distriqt-gmaps
svn co http://gmaps-utility-library-flash.googlecode.com/svn/trunk/ gmaps-utility-library-flash-read-only
</pre>
</p>
<p>You'll end up with a src directory in both of these checkouts that you need to add to your source path for your projects.</p>
<p>Here are the current packages (v1.2) <a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/distriqt-gmaps-kmlloader.zip'>distriqt-gmaps-kmlloader-v1.2</a> and <a href='http://labs.distriqt.com/wordpress/wp-content/uploads/2011/06/google-utility-library-flash.zip'>google-utility-library-flash</a>.</p>
<p>Let me know if you find it useful!</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/577"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/577/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>KML Interactions</title>
		<link>http://labs.distriqt.com/post/421</link>
		<comments>http://labs.distriqt.com/post/421#comments</comments>
		<pubDate>Mon, 04 Oct 2010 11:49:09 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[interaction]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=421</guid>
		<description><![CDATA[I've had a few requests asking about how to interact with the KML once you've loaded it onto the map. It's really quite an easy step once you've got the KML on there but I'll show you how in this simple example. Firstly if you haven't read the Simple KML Loader post then head over [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F421"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F421&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I've had a few requests asking about how to interact with the KML once you've loaded it onto the map. It's really quite an easy step once you've got the KML on there but I'll show you how in this simple example.</p>
<p><a href="http://labs.distriqt.com/examples/kmlloader/index.html" rel="shadowbox"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2010/10/kml-interaction-example-580x332.png" alt="KML Interaction Example" title="KML Interaction Example" width="580" height="332" class="aligncenter size-medium wp-image-422" /></a><br />
<span id="more-421"></span><br />
Firstly if you haven't read the <a href="http://labs.distriqt.com/post/251">Simple KML Loader</a> post then head over there first. It explains how to get that KML file loaded and displayed on your map.</p>
<p>The objective of this simple example is to show an info window popup when we rollover one of the objects in the kml, showing the name of the kml object in the window.</p>
<p>The code for this example is in our svn:</p>
<p><code>svn co http://svn.distriqt.com/public/trunk/gmaps/examples/kmlloader/</code></p>
<p>Make sure you have our SimpleKmlLoader library in your project.</p>
<p>To create the loader, load the kml and have it added to your map:</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> _loader:SimpleKmlLoader = <span style="color: #000000; font-weight: bold;">new</span> SimpleKmlLoader<span style="color: #66cc66;">&#40;</span> _map, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, loader_completeHandler <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> _file <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>Now on the complete handler you can add the interactions:</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> loader_completeHandler<span style="color: #66cc66;">&#40;</span> _event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// At this point generally this objects array</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//   will simply be the base object of the KML</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	addInteraction<span style="color: #66cc66;">&#40;</span> _loader.<span style="color: #006600;">objects</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;* Add interaction to every object in the array</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;*/</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> addInteraction<span style="color: #66cc66;">&#40;</span> _objects:<span style="color: #0066CC;">Array</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject <span style="color: #b1b100;">in</span> _objects<span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">interactive</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapMouseEvent.<span style="color: #006600;">ROLL_OVER</span>, object_rollOverHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		_object.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapMouseEvent.<span style="color: #006600;">ROLL_OUT</span>, object_rollOutHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">// Process any children</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		addInteraction<span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">children</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> object_rollOverHandler<span style="color: #66cc66;">&#40;</span> _event:MapMouseEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// show an info panel...</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject = KmlDisplayObject<span style="color: #66cc66;">&#40;</span>_event.<span style="color: #006600;">currentTarget</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	_map.<span style="color: #006600;">openInfoWindow</span><span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">latLng</span>, <span style="color: #000000; font-weight: bold;">new</span> InfoWindowOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>content:_object.<span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> object_rollOutHandler<span style="color: #66cc66;">&#40;</span> _event:MapMouseEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	_map.<span style="color: #006600;">closeInfoWindow</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p>Now when you run with this code you should see the name of the kml object appear in the info window when you rollover the object. This is of course a very simple example, and much more can be done with this, but it is a good point to introduce the concept of interactions.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/421"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/421/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Simple KML Loader Revisited</title>
		<link>http://labs.distriqt.com/post/251</link>
		<comments>http://labs.distriqt.com/post/251#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:40:02 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=251</guid>
		<description><![CDATA[Recently we've been using some of our own tools in other projects and found some room for improvement on the KML Loader we developed. In particular we wanted a simple class that could handle all the processing from the loader, adding the resulting overlays to the google map. Also we needed it to load in [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F251"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F251&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently we've been using some of our own tools in other projects and found some room for improvement on the KML Loader we developed. In particular we wanted a simple class that could handle all the processing from the loader, adding the resulting overlays to the google map. Also we needed it to load in some of the styles, such as colours and line types. </p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2010/08/simplekmlloader-example-screenshot1.jpg" rel="shadowbox[sbpost-251];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2010/08/simplekmlloader-example-screenshot1-580x294.jpg" alt="Example Kml Loader ScreenShot" title="Example Kml Loader ScreenShot" width="580" height="294" class="aligncenter size-medium wp-image-316" /></a></p>
<p>So we've expanded our <a href="http://labs.distriqt.com/post/164"><code>KmlLoader</code></a> class and provided a few additional utility classes.<br />
<span id="more-251"></span><br />
Before we get into it, to get the latest version, just checkout from our public svn:</p>
<p><code>svn co http://svn.distriqt.com/public/trunk/gmaps</code></p>
<p>The most useful is the <code>SimpleKmlLoader</code> class. This simplifies the loading and display of a kml file to a single line of code.</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> <span style="color: #000000; font-weight: bold;">new</span> SimpleKmlLoader<span style="color: #66cc66;">&#40;</span> _map, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> _file <span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>Generally you'll probably want to do something more with the kml than just display it, but this is handy for those quick display situations. You'll probably more want to do something like this, adding an event listener for when the file is loaded:</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> _loader:SimpleKmlLoader = <span style="color: #000000; font-weight: bold;">new</span> SimpleKmlLoader<span style="color: #66cc66;">&#40;</span> _map, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, loader_completeHandler <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">_loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span> _file <span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>The second parameter provided to the constructor is an option to automatically add the objects to the map when the load is complete, so you no longer have to worry about adding the features to the map. </p>
<p>Once the loader has completed you'll have access to all the objects loaded from within the file. Each of the Kml Objects is represented by the <code>KmlDisplayObject</code> class, which has automatically created the appropriate type of map feature to add when required. </p>
<p>The important properties are <code>SimpleKmlLoader.objects</code> which is an array of <code>KmlDisplayObject</code> and then <code>KmlDisplayObject.children</code> contains all the children of that object (again an array of <code>KmlDisplayObject</code>).</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">distriqt</span>.<span style="color: #006600;">gmaps</span>.<span style="color: #006600;">kml</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;* Iterates over the objects and traces out the name of</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;*   each and recurses into the children of each object</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;* @param _objects	An array of KmlDisplayObjects</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;* @param _prefix	A string to prefix to the output trace</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp;*/</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> traceObjects<span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    _objects:<span style="color: #0066CC;">Array</span> <span style="color: #808080; font-style: italic;">/* of KmlDisplayObject */</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">    _prefix:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject <span style="color: #b1b100;">in</span> _objects<span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> _prefix+<span style="color: #ff0000;">&quot; &quot;</span>+_object.<span style="color: #0066CC;">name</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		traceObjects<span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">children</span>, _prefix + <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> loader_completeHandler<span style="color: #66cc66;">&#40;</span> _event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	traceObjects<span style="color: #66cc66;">&#40;</span> _loader.<span style="color: #006600;">objects</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li></ol></pre>
<p>The trace output from the function above would look something like the below:</p>
<pre>
 districts for BSI
	 kangaroo ground
	 kinglake west
	 kinglake
	 ...
</pre>
<p>There is an example usage of the class in the svn, <code>gmaps/examples/kmlloader/</code>. It will load the kml file shown in the image above.</p>
<p>We've also added some Kml editing and saving tools into the svn which we'll leave those for the subject of another post but feel free to check out the <a href="http://svn.distriqt.com/public/trunk/gmaps/">code</a>.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/251"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/251/feed</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
		<item>
		<title>Simple KML Loader</title>
		<link>http://labs.distriqt.com/post/164</link>
		<comments>http://labs.distriqt.com/post/164#comments</comments>
		<pubDate>Tue, 20 Oct 2009 07:56:56 +0000</pubDate>
		<dc:creator>Michael Archbold</dc:creator>
				<category><![CDATA[experiments]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[abc]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[google-maps]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=164</guid>
		<description><![CDATA[Lately we have been playing around a fair bit with some google flash maps and have been amazed by the power and simplicity of the API. We used it heavily in the ABC Black Saturday site using custom markers with images and even a scrolling grid. We were faced with another challenge of being able [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F164"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F164&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Lately we have been playing around a fair bit with some google flash maps and have been amazed by the power and simplicity of the API. We used it heavily in the ABC Black Saturday site using custom markers with images and even a scrolling grid.</p>
<p>We were faced with another challenge of being able to mark out areas (districts) within Victoria that represented the most affected regions. These regions were sometimes complex and we needed to be able to update them simply and quickly as the need arose. The regions weren't to be displayed directly but used for two major items.  Firstly to focus the map on a particular region, by moving the view to the region contained by these districts, and secondly, to assign events/markers to a district by calculating if they were contained within the bounds of the district lines.</p>
<p>The solution ended up being ridiculously simple. We created a shared map on google maps, with shapes defining the districts. We then could export from this online map to kml by grabbing the view in Google Earth link and changing the output parameter from nl to kml. This gave us the map of the districts in a nice kml format.</p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2009/10/abc-district-google-map.png" rel="shadowbox[sbpost-164];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2009/10/abc-district-google-map-150x150.png" alt="abc-district-google-map" title="abc-district-google-map" width="150" height="150" class="aligncenter size-thumbnail wp-image-168" /></a></p>
<p>Once we had the map in kml we needed to load in the objects and create overlays for google maps. Surprisingly there wasn't a simple "load kml" function in google maps, but there are some nice kml parsing utilities in the google map extras library. So we created a kml loader class that loads the kml file, extracts the objects and creates overlays for placement on a google map. Hopefully it can be helpful to others, check it out from the following:</p>
<p><code>svn co http://svn.distriqt.com/public/trunk/gmaps<br />
</code></p>
<p>Usage:</p>
<p>Firstly create the loader and start the load of your kml file. You'll need to add a listener to the COMPLETE event to process the code on completion.</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">distriqt</span>.<span style="color: #006600;">gmaps</span>.<span style="color: #006600;">kml</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">*</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> kmlLoader:KmlLoader = <span style="color: #000000; font-weight: bold;">new</span> KmlLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">kmlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">COMPLETE</span>, kmlLoader_completeHandler <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">kmlLoader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>  <span style="color: #ff0000;">&quot;your-kml-file-location.kml&quot;</span> <span style="color: #66cc66;">&#41;</span>;</div></li></ol></pre>
<p>Once the loading is complete you'll have to re-curse through the object list in the loader, adding the objects to your map. Note the "map" variable in the below should be your google map instance.</p>
<pre class="actionscript"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> kmlLoader_completeHandler<span style="color: #66cc66;">&#40;</span> _event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _object:KmlDisplayObject <span style="color: #b1b100;">in</span> KmlLoader<span style="color: #66cc66;">&#40;</span>_event.<span style="color: #006600;">currentTarget</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">objects</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		addObject<span style="color: #66cc66;">&#40;</span> _object <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> addObject<span style="color: #66cc66;">&#40;</span> _object:KmlDisplayObject <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// It may just be a container with child elements</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">//    so check if there is an overlay</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_object.<span style="color: #006600;">overlay</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		<span style="color: #808080; font-style: italic;">// Here you can add the kml object to your map</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		map.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span> _object.<span style="color: #006600;">overlay</span> <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #808080; font-style: italic;">// Add the children</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">for</span> each <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> _child:KmlDisplayObject <span style="color: #b1b100;">in</span> _object.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		addObject<span style="color: #66cc66;">&#40;</span> _child <span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li></ol></pre>
<p>Let us know if you find it useful.</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/164"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/164/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>ABC Black Saturday Interactive goes live</title>
		<link>http://labs.distriqt.com/post/156</link>
		<comments>http://labs.distriqt.com/post/156#comments</comments>
		<pubDate>Tue, 29 Sep 2009 03:09:43 +0000</pubDate>
		<dc:creator>Shane Korin</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[abc]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google-maps]]></category>
		<category><![CDATA[kml]]></category>
		<category><![CDATA[mashups]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://labs.distriqt.com/?p=156</guid>
		<description><![CDATA[Our first major project, ABC Black Saturday Interactive, went live yesterday! "It pulls together hundreds of pieces of media – professionally produced media, official documents and records and the best user generated content – to provide a stunning insight into the fires and the people who lived through them. An interactive map and timeline allow [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F156"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.distriqt.com%2Fpost%2F156&amp;source=distriqt&amp;style=normal&amp;service=bit.ly&amp;service_api=R_d2c0f1a5509cd228ab0be545d628ad7a&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Our first major project, ABC Black Saturday Interactive, went live yesterday!</p>
<p><em>"It pulls together hundreds of pieces of media – professionally produced media, official documents and records and the best user generated content – to provide a stunning insight into the fires and the people who lived through them. An interactive map and timeline allow you to explore the events through time and location, and a series of dramatic video portraits provide a moving insight into the personal experiences of some survivors."</em></p>
<p><a href="http://labs.distriqt.com/wordpress/wp-content/uploads/2009/09/blacksaturday_screenshot.jpg" rel="shadowbox[sbpost-156];player=img;"><img src="http://labs.distriqt.com/wordpress/wp-content/uploads/2009/09/blacksaturday_screenshot.jpg" alt="ABC Black Saturday Interactive" title="ABC Black Saturday Interactive" width="580" height="300" class="aligncenter size-full wp-image-302" /></a></p>
<p>This project has been a great experience, and we're really happy with the end product. The site pulls together a heap of media data such as video, audio, imagery and news content from a multitude of sources and combines it into a great interactive experience. The Google Maps API also provided us with a really interesting way of exploring the data visually based on the time and location of every media item and story.</p>
<p>Huge thanks go to the ABC Innovation Department, the producer Priscilla Davies, designers Bec Smith and Sarah Fawcett, and everyone else who contributed to the project - it was a great team to work with.</p>
<p>We're really proud to see this online so please go and check it out and explore the site!</p>
<p><a href="http://abc.net.au/blacksaturday/">Black Saturday Interactive</a></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://labs.distriqt.com/post/156"></g:plusone></div>]]></content:encoded>
			<wfw:commentRss>http://labs.distriqt.com/post/156/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

