<?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>Quick Tweaks &#187; google</title>
	<atom:link href="http://www.quicktweaks.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quicktweaks.com</link>
	<description>Quick Tweaks For Your System</description>
	<lastBuildDate>Tue, 27 Sep 2011 05:41:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Creating a multiuser interactive Google Map gadget for Google Wave with JQuery &#8211; Part I</title>
		<link>http://www.quicktweaks.com/2009/11/15/creating-a-multiuser-interactive-google-map-gadget-for-google-wave-with-jquery-part-i/</link>
		<comments>http://www.quicktweaks.com/2009/11/15/creating-a-multiuser-interactive-google-map-gadget-for-google-wave-with-jquery-part-i/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:01:15 +0000</pubDate>
		<dc:creator>ashokgelal</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[google wave]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[robot]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.quicktweaks.com/?p=269</guid>
		<description><![CDATA[In this post I will show how to create a simple multi-user interactive map gadget contains a marker showing the current location. Any one of the participants can change the current location of the map. The 'change' will be reflected on the map of all the participants. 


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>We just released the beta version of <a title="tweat.org" href="http://tweat.org/" target="_blank">tweat.org</a> &#8211; a site which maps the best meals in your town. We (by we mean me and the awesome <a title="Trent Cutler's home page" href="http://trentcutler.com/" target="_blank">Trent Cutler</a>) decided that we also need a Tweat extension for Google Wave. It might be very useful for users to find out the best restaurant to go for their next lunch &#8211; from right within Google Wave! <a title="Getting ready for a Google Wave extension" href="http://www.ashokgelal.com/2009/11/getting-ready-for-a-google-wave-extension/" target="_blank">I&#8217;m already started working on it</a>, and you should hear about an awesome Google Wave extension pretty soon <img src='http://www.quicktweaks.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>After using Google Wave for about 10 days, I&#8217;ve absolutely fallen in love with it. It&#8217;s not only fun, but is a very useful collaboration tool. I honestly believe that it will change the way we communicate. One of the most powerful features of Google Wave is its support for extensions. In this post I will show how to create a simple multi-user interactive map gadget. Read on if you are interesting in developing a Google Wave gadget. If you only jumped in to this site looking for a Google Wave invitation, <a title="Google Wave invitation" href="http://blog.tweat.org/2009/11/tweat-org-is-giving-away-google-wave-invites/" target="_blank">this might help you out to get one</a>. If you have a Google Wave account and want to try this gadget, here is the link to the gadget: <a title="Google Wave Extension" href="http://wave.tweat.org/gwave/tut/tut.xml" target="_blank">http://wave.tweat.org/gwave/tut/tut.xml</a></p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-0816309066023726";
google_ad_slot = "7783831711";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h3><span id="more-269"></span><br />
<strong> What really are we going to create?</strong></h3>
<p>A Google map which contains a marker showing the current location. Any one of the participants can change the current location of the map. The &#8216;change&#8217; will be reflected on the map of all the participants. There is already a full featured Google Wave gadget called Mappy, and you can even read its source code. This post is just a beginner&#8217;s guide and also the full featured Mappy is advance and pretty hard to understand.<br />
This is just the first part of a long series of tutorials on Goolge Wave gadget. In other parts we will try to integrate geo-location and other features similar to the one we have in <a title="tweat.org google map" href="http://tweat.org/eatlocal/" target="_blank">tweat.org</a>. If you want to see any other features, let me know in the comments.</p>
<p>Though developing a gadget is very easy and intuitive, it is not so easy to test the gadget from within your local server. Unless you have access to Google Wave Sandbox, which I unfortunately don&#8217;t have, it is going to be a bit difficult. Nevertheless, it is very fun and I would say very good investment to invest some time and efforts in learning how to develop a Google Wave gadget. Before you open up your text editor and start acting like a code monkey, there are few things you need:</p>
<ol>
<li>Obviously, a Google Wave account. If you have someone else that can be with you while you are testing, that would be very convenient! For those of you who don&#8217;t have any Google Wave account or if you need another one &#8211; <a title="Google Wave invitation" href="http://blog.tweat.org/2009/11/tweat-org-is-giving-away-google-wave-invites/" target="_blank">this might help you out</a>.</li>
<li>Get a Google AJAX Libraries api key: <a href="http://code.google.com/apis/maps/signup.html">http://code.google.com/apis/maps/signup.html</a>. We will be using Google Map, and JQuery hosted at Google CDN.</li>
<li>After you are ready to test your gadget, you need to host your files in a publicly accessible place. If you don&#8217;t have one and don&#8217;t mind sharing your gadget making it an open-source, you can try Google&#8217;s own Gadgets API Developer Tools <a href="http://code.google.com/apis/gadgets/docs/tools.html#Host">http://code.google.com/apis/gadgets/docs/tools.html#Host</a> which allows you to host your gadget for free!</li>
</ol>
<p>That&#8217;s all we need for now.</p>
<h3>Getting Started:</h3>
<p>Fireup your favorite text editor and start with the following:</p>
<p>[html]<br />
&amp;lt;body&amp;gt;<br />
        &amp;lt;div id=&amp;quot;map_canvas&amp;quot; style=&amp;quot;height: 350px; width:500px&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;<br />
        &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;address&amp;quot; /&amp;gt;<br />
        &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;submit&amp;quot; /&amp;gt;<br />
&amp;lt;/body&amp;gt;<br />
[/html]</p>
<p>We just created a 350x500px div to hold our map. We also created an input box to type in the address, and a submit button to geocode the address and show on the map. Let&#8217;s move into the main part, the javascript part. Add the following codes just before the</p>
<p>[javascript]<br />
&amp;lt;head&amp;gt;<br />
     &amp;lt;script src=&amp;quot;http://www.google.com/jsapi?key=&amp;lt;PUT YOUR JS API HERE&amp;gt;&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;<br />
     &amp;lt;script&amp;gt;<br />
       google.load(&amp;quot;maps&amp;quot;, &amp;quot;2&amp;quot;);<br />
       google.load(&amp;quot;jquery&amp;quot;, &amp;quot;1.3&amp;quot;);<br />
     &amp;lt;/script&amp;gt;<br />
&amp;lt;/head&amp;gt;<br />
[/javascript]</p>
<p>What are we doing here? Not much except than just loading Google Maps (v2) and Jquery (v1.3) library from Google CDN.</p>
<p>Now the fun part, add the following lines just before the closing <code><em></em></code> tag. Don&#8217;t worry if you don&#8217;t understand even a single line, we will go through each line and will see what&#8217;s going on.</p>
<p>[javascript]<br />
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;<br />
 var map;<br />
 var geocoder;<br />
 var marker;<br />
 $(function(){<br />
      map = new GMap2(document.getElementById(&amp;quot;map_canvas&amp;quot;));<br />
      map.setUIToDefault();<br />
      geocoder = new GClientGeocoder();<br />
      map.getInfoWindow();</p>
<p>      marker = new GMarker(new GLatLng(0,0));<br />
      map.addOverlay(marker);<br />
      map.setCenter(marker.getLatLng(),13);</p>
<p>      $(&#8216;input[name=submit]&#8216;).bind(&#8216;click&#8217;, function(){<br />
           address = $(&#8216;input[name=address]&#8216;).val();<br />
           wave.getState().submitDelta({<br />
                &#8216;address&#8217;:address<br />
           });<br />
           return false;<br />
      });<br />
 });</p>
<p> function reload(){<br />
      address = wave.getState().get(&#8216;address&#8217;);<br />
      geocoder.getLatLng(address, function(latlng){<br />
           if(!latlng){<br />
               alert(&amp;quot;Cannot determine the address&amp;quot;);<br />
           }else{<br />
              marker.setLatLng(latlng);<br />
              map.setCenter(latlng, 13);<br />
           }<br />
     })<br />
 }</p>
<p> function init() {<br />
      if (wave &amp;amp;&amp;amp; wave.isInWaveContainer()) {<br />
           wave.setStateCallback(reload);<br />
      }<br />
 }</p>
<p> gadgets.util.registerOnLoadHandler(init);<br />
[/javascript]</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-0816309066023726";
google_ad_slot = "7783831711";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<h3><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Details:</span></h3>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">Let's talk about the function <code><em>init</em> </code>and the last line:</span></pre>
<p>[javascript]gadgets.util.registerOnLoadHandler(init) [/javascript]</p>
<p>The line says that whenever the gadget is loaded, call the <code><em>init </em></code>method. The name of the function can be anything, it doesn&#8217;t have to be <code><em>init</em></code>. <code><em>init </em></code>just makes it clear, and intuitive that this function will be called when the gadget will be <em>initialized</em>. Now, inside the <code><em>init </em></code>function, we check that the wave has been defined and the wave is in the wave container (which is the job of Google Wave to create and initialize wave object you don&#8217;t have to worry about this). If it is then whenever there is a change in wave&#8217;s state, it calls the global function <code><em>reload</em></code>. If you are smart enough, you might have already guessed that the <code><em>reload </em></code>will be the main function handling all of our user interactions.</p>
<p>On the top, we started by declaring three global variables:<br />
<code><em>map </em></code>-&gt; for holding reference to the map that we are going to add<br />
<code><em>geocoder </em></code>-&gt; to convert the given address into latitude/longitude value<br />
<code><em>marker </em></code>-&gt; for holding reference to the marker which will represent the given address on the map</p>
<p>Now, we want to add map to the div <em>ONLY </em>after dom is ready for which we will use the wonderful JQuery:</p>
<p>[javascript]<br />
$(function(){<br />
[/javascript]</p>
<p>Now, we will create our map, attach the map to our div, set the map UI to default. We will create a geocoder object, and a marker:</p>
<p>[javascript]<br />
      map = new GMap2(document.getElementById(&amp;quot;map_canvas&amp;quot;));<br />
      map.setUIToDefault();<br />
      geocoder = new GClientGeocoder();<br />
      map.getInfoWindow();<br />
      marker = new GMarker(new GLatLng(0,0));<br />
      map.addOverlay(marker);<br />
      map.setCenter(marker.getLatLng(),13);<br />
[/javascript]</p>
<p>Please notice that the the marker&#8217;s initial position is at 0,0 and also the initial zoom is 13</p>
<p>Now, we will bind the click action on the <em>submit </em>button&#8230;</p>
<p>[javascript]<br />
$(&#8216;input[name=submit]&#8216;).bind(&#8216;click&#8217;, function(){<br />
[/javascript]</p>
<p>&#8230;and get the current address from the <em>input </em>box:</p>
<p>[javascript]<br />
address = $(&#8216;input[name=address]&#8216;).val();<br />
[/javascript]</p>
<p>Now, it is time to make our map react with the submit button&#8217;s click action. For this we will pass a key/value pair (called map in JavaScript) to wave which will notify our <code><em>reload</em> </code>function (we will come to this function in a few seconds):</p>
<p>[javascript]<br />
wave.getState().submitDelta({<br />
&#8216;address&#8217;:address<br />
});<br />
return false;<br />
[/javascript]</p>
<p>These two lines are really important. We are passing the value from the <code><em>input </em></code>box held in <code><em>address </em></code>variable to wave&#8217;s current state.</p>
<p>Now, we will write a global function reload which will be called every time one of the participants clicks on the <code><em>submit </em></code>button to set a new address.<br />
We will first grab the value of address from the map that we passed in line 17-18:</p>
<p>[javascript]<br />
address = wave.getState().get(&#8216;address&#8217;);<br />
[/javascript]</p>
<p>We will now use Google&#8217;s geocoding service to get the equivalent latitude/longitude value for this address:</p>
<p>[javascript]<br />
      geocoder.getLatLng(address, function(latlng){<br />
           if(!latlng){<br />
               alert(&amp;quot;Cannot determine the address&amp;quot;);<br />
           }else{<br />
              marker.setLatLng(latlng);<br />
              map.setCenter(latlng, 13);<br />
           }<br />
     })<br />
[/javascript]</p>
<p>If the geocoder returns a latlng value we will set the marker, and center our map to that latlng otherwise we will alert the participants that the address cannot be determined.</p>
<p>That&#8217;s all for our application part. Now, it is time to wrap up our code in a format recognized by Google Wave. Include following lines on top of the file (before <code><em></em></code>):</p>
<p>[xml]<br />
&amp;lt;Module&amp;gt;<br />
     &amp;lt;ModulePrefs title=&amp;quot;My first Google Wave Gadget&amp;quot; height=&amp;quot;450&amp;quot;&amp;gt;<br />
          &amp;lt;Require feature=&amp;quot;wave&amp;quot;/&amp;gt;<br />
     &amp;lt;/ModulePrefs&amp;gt;<br />
     &amp;lt;Content type=&amp;quot;html&amp;quot;&amp;gt;<br />
         &amp;lt;![CDATA[<br />
[/xml]</p>
<p><code><em>ModulePrefs </em></code>is the place where you can set all the settings for your gadget such as height, width, title, icon, thumbnail etc. Among other, height is important and you might have to do a little bit of hit-and-trial to get to the height which won&#8217;t cover a part of your gadget inside a wave. For more information about available settings, <a title="Google Wave gadget documentation" href="http://code.google.com/apis/gadgets/docs/basic.html#Userprefs" target="_blank">please visit official Google Wave documentation</a>.</p>
<p>Finally, finish off the code by closing the xml tags. At the end of your file, right after &lt;/body&gt; tag, include:</p>
<p>[xml]<br />
          ]]&amp;gt;<br />
     &amp;lt;/Content&amp;gt;<br />
&amp;lt;/Module&amp;gt;<br />
[/xml]</p>
<h3>Download the source:</h3>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-0816309066023726";
google_ad_slot = "7783831711";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><a title="Download tut source code" href="http://dl.dropbox.com/u/83257/tut.xml" target="_blank">Download the source file from here</a> to see, and be sure that it matches everything with yours.</p>
<h3>What next?</h3>
<p>As I&#8217;ve already talked about this earlier, this is just the first part, I will definitely come up with other parts to make this gadget more useful. I do hope that you guys will also share your knowledge, and experience with me, and other readers. I would definitely welcome any feedback and constructive criticism. Keep coming back as the next extension we will be developing, after we finish this gadget, will be a Google Wave Robot!!! For now start a new wave with one of your friends so that you can test out your first ever Google Wave gadget. If you don&#8217;t find anyone, &#8216;buzz&#8217; me at ashokgelal[at]googlewave[dot]com. If I&#8217;m online and not busy, I will definitely help you out. In the mean time, don&#8217;t forget to follow me at Twitter <a title="follow ashokgelal at Twitter" href="http://twitter.com/ashokgelal" target="_blank">@ashokgelal</a> and also tweatorg <a title="follow tweatorg at Twitter" href="http://twitter.com/tweatorg" target="_blank">@tweatorg</a>.</p>
<p>Happy Waving!</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.quicktweaks.com/2009/11/15/creating-a-multiuser-interactive-google-map-gadget-for-google-wave-with-jquery-part-i/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Pimp your Google with GoogleRedesigned</title>
		<link>http://www.quicktweaks.com/2008/10/20/pimp-your-google-with-googleredesigned/</link>
		<comments>http://www.quicktweaks.com/2008/10/20/pimp-your-google-with-googleredesigned/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 04:05:47 +0000</pubDate>
		<dc:creator>ashokgelal</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[flock]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.quicktweaks.com/?p=223</guid>
		<description><![CDATA[Got bored of those dull Google colors and themes? GoogleRedisgned is a Firefox/Flock extension which gives a totally new look to some of the Google products such as Gmail and GCalendar.


No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Got bored of those dull Google colors and themes? GoogleRedisgned is a Firefox/Flock extension which gives a totally new look to some of the Google products such as Gmail and GCalendar. Check these screenshots:</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-0816309066023726";
google_ad_slot = "7783831711";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<div id="attachment_226" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-6.png"><img class="size-medium wp-image-226" title="gmail progress bar" src="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-6-300x206.png" alt="Gmail progress bar" width="300" height="206" /></a><p class="wp-caption-text">Gmail progress bar</p></div>
<p><span id="more-223"></span></p>
<div id="attachment_225" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-5.png"><img class="size-medium wp-image-225" title="gmail login box" src="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-5-300x233.png" alt="Gmail login box" width="300" height="233" /></a><p class="wp-caption-text">Gmail login box</p></div>
<div id="attachment_224" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-4.png"><img class="size-medium wp-image-224" title="Gmail Inbox" src="http://www.quicktweaks.com/wp-content/uploads/2008/10/screenshot-4-300x160.png" alt="Gmail Inbox" width="300" height="160" /></a><p class="wp-caption-text">Gmail Inbox</p></div>
<p>Impressed? If yes than you might want to try it out, <a title="Install Redigned Google extension" href="http://www.globexdesigns.com/gr/Google_Redesigned_0.1.xpi" target="_blank">install Google</a><a title="Install Redigned Google extension" href="http://www.globexdesigns.com/gr/Google_Redesigned_0.1.xpi" target="_blank">Redesigned </a> extension from the <a title="GoogleRedesigned homepage" href="http://www.globexdesigns.com/gr/" target="_blank">extension&#8217;s homepage</a>.</p>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-0816309066023726";
google_ad_slot = "7783831711";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>[via: <a title="GoogleRedesigned homepage" href="http://www.globexdesigns.com/gr/" target="_self">globexdesigns.com</a>. Thanks to Sash for the link.]</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.quicktweaks.com/2008/10/20/pimp-your-google-with-googleredesigned/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

