<?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>ABCoder &#187; Google Map API</title>
	<atom:link href="http://abcoder.com/topics/google/google-map-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://abcoder.com</link>
	<description>ABCoder - Coding is Simple as A b c</description>
	<lastBuildDate>Sat, 17 Jul 2010 11:45:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Print button for Google Map API</title>
		<link>http://abcoder.com/google/google-map-api/print-button-for-google-map-api/</link>
		<comments>http://abcoder.com/google/google-map-api/print-button-for-google-map-api/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 20:41:33 +0000</pubDate>
		<dc:creator>adnan</dc:creator>
				<category><![CDATA[Google Map API]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[gmap]]></category>
		<category><![CDATA[google map]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[print]]></category>
		<category><![CDATA[print button for google map api]]></category>

		<guid isPermaLink="false">http://abcoder.com/?p=137</guid>
		<description><![CDATA[Easy solution to print your google map from your website's gmap api.


Related posts:<ol><li><a href='http://abcoder.com/apple/printer-driver-updates-by-apple/' rel='bookmark' title='Permanent Link: A pair of printer driver updates released by Apple'>A pair of printer driver updates released by Apple</a> <small>Recently Apple has released a pair of printer driver updates...</small></li>
<li><a href='http://abcoder.com/seo/seo-tips-reduce-your-externa-links/' rel='bookmark' title='Permanent Link: SEO tips: Reduce your unwanted external links using jQuery'>SEO tips: Reduce your unwanted external links using jQuery</a> <small>Remove the direct links to addthis.com, wordpress.org and the free theme provider using jQuery. In this method the user to your site will see the links but search bots won't, cos the links are added dynamically using javascript after the page / dom is fully loaded. Use at your own risk....</small></li>
<li><a href='http://abcoder.com/javascript/how-to-get-currently-logged-on-windows-username-in-php-javascript/' rel='bookmark' title='Permanent Link: How to get currently logged on windows username in PHP and Javascript'>How to get currently logged on windows username in PHP and Javascript</a> <small>Get current windows username in php and javascript! Is that possible?...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You can easily print google map from <a href="http://maps.google.com/">maps.google.com</a>. But what about printing the map from gmap api you use on your own website? One way is to print the whole page which is not a good idea. Users want to print only the location of your business in a larger size for later purposes. Google map api does not provide any function to print the map or view it in printer friendly mode.</p>
<p>The only solution I found is using a simple javascript code for this purpose. At first place an image/text/button anywhere (obviously easily available to visitors) on the page that contains your map api. I prefer to use a small printer icon image. Apply onclick(inline or unobtrusive) event to the button to popup a page say print.html.</p>
<pre class="brush: xml;">&lt;img src=&quot;images/print.png&quot; class=&quot;print&quot; alt=&quot;print&quot; title=&quot;print&quot; onclick=&quot;window.open('print.html')&quot; /&gt;</pre>
<p>Now create an empty html document, name it print.html and put it in the root folder of your site. Place this simple javascript code inside body tag of print.html </p>
<pre class="brush: jscript;">&lt;script language=&quot;javascript&quot;&gt;
var contents = window.opener.document.getElementById(&quot;map_container&quot;);
document.write(contents.innerHTML);
window.print();
&lt;/script&gt;</pre>
<p>Replace the &#8220;map_container&#8221; with the #id you are using for your map container. That&#8217;s all, you are done!</p>
<p>This method is good enough for printing static google map layout. But you can not print driving direction as that line is drawn using canvas element. In fact you can not print the exact driving direction even from <a href="http://maps.google.com/">maps.google.com</a>.</p>
<p>This is more or less a better solution for printing the map from your own website&#8217;s gmap api. Please lemme know if you know any smarter way to do it.</p>


<p>Related posts:</p><ol><li><a href='http://abcoder.com/apple/printer-driver-updates-by-apple/' rel='bookmark' title='Permanent Link: A pair of printer driver updates released by Apple'>A pair of printer driver updates released by Apple</a> <small>Recently Apple has released a pair of printer driver updates...</small></li>
<li><a href='http://abcoder.com/seo/seo-tips-reduce-your-externa-links/' rel='bookmark' title='Permanent Link: SEO tips: Reduce your unwanted external links using jQuery'>SEO tips: Reduce your unwanted external links using jQuery</a> <small>Remove the direct links to addthis.com, wordpress.org and the free theme provider using jQuery. In this method the user to your site will see the links but search bots won't, cos the links are added dynamically using javascript after the page / dom is fully loaded. Use at your own risk....</small></li>
<li><a href='http://abcoder.com/javascript/how-to-get-currently-logged-on-windows-username-in-php-javascript/' rel='bookmark' title='Permanent Link: How to get currently logged on windows username in PHP and Javascript'>How to get currently logged on windows username in PHP and Javascript</a> <small>Get current windows username in php and javascript! Is that possible?...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://abcoder.com/google/google-map-api/print-button-for-google-map-api/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
