<?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>eTatvasoft - PHP Development Company &#187; Google Maps API</title>
	<atom:link href="http://www.etatvasoft.com/blog/tag/google-maps-api/feed" rel="self" type="application/rss+xml" />
	<link>http://www.etatvasoft.com/blog</link>
	<description>PHP Development India</description>
	<lastBuildDate>Wed, 08 Sep 2010 04:11:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Integrating Google Maps API into your Website</title>
		<link>http://www.etatvasoft.com/blog/integrating-google-maps-api-into-your-website.html</link>
		<comments>http://www.etatvasoft.com/blog/integrating-google-maps-api-into-your-website.html#comments</comments>
		<pubDate>Wed, 03 Feb 2010 07:16:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Google Maps API]]></category>

		<guid isPermaLink="false">http://www.etatvasoft.com/blog/?p=26</guid>
		<description><![CDATA[Have you come across some site that has a small box that shows maps just like those shown on Google Maps web page? Well, it’s simple to get one of those Google Maps to be integrated on your website as well. Google code gives away its Google Maps Application Programming Interface (API) for free. Provided [...]]]></description>
			<content:encoded><![CDATA[<p>Have you come across some site that has a small box that shows maps just like those shown on Google Maps web page? Well, it’s simple to get one of those Google Maps to be integrated on your website as well. Google code gives away its Google Maps Application Programming Interface (API) for free. Provided you abide by the Google Terms and Conditions, you are free to embed the Google Maps API on your web application with JavaScript. The API provides a number of utilities for manipulating maps like those on the original Google Maps does.<span id="more-26"></span></p>
<p>There is no rocket science involved in embedding the Google Maps API into your webpage. All you need to know is exactly where you need to put the map for the public display and use. Other things are managed by Google for you. Just follow the following steps and you will have a seamless integration of the Google Maps API on your page in no time.</p>
<p><strong>1. </strong><strong>Sign up for a Google API key.</strong></p>
<p>You are required to accept the Google terms and conditions, provide the URL of the website that you are going to embed the Google Maps API in, and confirm the registration to get the API key. You can apply for the key at <a title="Google Maps API Registration" href="http://www.google.com/apis/maps/signup.html" target="_blank">http://www.google.com/apis/maps/signup.html</a>.</p>
<p><a href="http://www.etatvasoft.com/blog/wp-content/uploads/2010/02/confirm-for-API-key.jpg"><img class="alignnone size-full wp-image-136" title="confirm for API key" src="http://www.etatvasoft.com/blog/wp-content/uploads/2010/02/confirm-for-API-key.jpg" alt="Confirm and Generate API Key for your Website" width="623" height="112" /></a></p>
<p>By checking the agreement box, entering the URL, and pressing the “Generate API key” button, you will get an API key that looks like this:</p>
<p><a href="http://www.etatvasoft.com/blog/wp-content/uploads/2010/02/API-key.jpg"><img class="size-full wp-image-137 alignleft" title="API key" src="http://www.etatvasoft.com/blog/wp-content/uploads/2010/02/API-key.jpg" alt="API Key Sample" width="628" height="41" /></a></p>
<p>Save this key in some text file as you will need this key to integrate it in the scripts to generate the maps.</p>
<p><strong>2. </strong><strong>Incorporating the Google Map.</strong></p>
<p>Incorporating the Google Map is really simple now that you have your API key. Copy the following code and paste it into your HTML file where you want your Google Maps API to perform.</p>
<pre class="codetype">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
    &lt;script src="http://maps.google.com/maps?file=api&amp;v=1
            &amp;key=&lt;YOUR_API_KEY_HERE&gt;"&gt;
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div style="width: 400px; height: 300px"&gt;&lt;/div&gt;
    &lt;script&gt;
//&lt;![CDATA[
    var map = new GMap(document.getElementById("map"));
    map.centerAndZoom(new GPoint((37.38216158779348, -122.08145141601562)3);
//]]&gt;
    &lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The &lt;YOUR_API_KEY_HERE&gt; is to be replaced by you API key provided by Google on confirmation as mentioned above. Executing this script will show Google Headquarters at Mountain View, CA as the center of the map. You can change the default center of the map by replacing the geographical coordinates in the</p>
<pre class="codetype"><em>map.centerAndZoom(new GPoint((37.38216158779348, -122.08145141601562)3);</em></pre>
<p>line. (37.38216158779348, -122.08145141601562) are the coordinates of Google Headquarters.﻿</p>
<p><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;ll=37.421981,-122.084327&amp;spn=0.019018,0.061798&amp;z=15&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/?ie=UTF8&amp;ll=37.421981,-122.084327&amp;spn=0.019018,0.061798&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>
<p>Save and upload the file on a web server and then you are ready to roll.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.etatvasoft.com/blog/integrating-google-maps-api-into-your-website.html/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>
