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.
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.
1. Sign up for a Google API key.
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 http://www.google.com/apis/maps/signup.html.
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:
Save this key in some text file as you will need this key to integrate it in the scripts to generate the maps.
2. Incorporating the Google Map.
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.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://maps.google.com/maps?file=api&v=1
&key=<YOUR_API_KEY_HERE>">
</script>
</head>
<body>
<div style="width: 400px; height: 300px"></div>
<script>
//<![CDATA[
var map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint((37.38216158779348, -122.08145141601562)3);
//]]>
</script>
</body>
</html>
The <YOUR_API_KEY_HERE> 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
map.centerAndZoom(new GPoint((37.38216158779348, -122.08145141601562)3);
line. (37.38216158779348, -122.08145141601562) are the coordinates of Google Headquarters.
Save and upload the file on a web server and then you are ready to roll.
Tags: Google Maps API

wow congrats to the author of this. this is a wonderful and beautifully written post. i love the way you explain things. ill keep reading the other posts as well.
It was a really nice thought! Just wanna say thank you for the information you have apportioned. Just continue composing this kind of post. I will be your hardcore reader. Thanks once again.
This is such a wonderful article. I look forward to seeing more of your writing.
i wouldn’t have considered this was cool several years ago however its surprising exactly how time switches the way you experience a variety of creative ideas, thank you for the blog post it’s pleasurable to see something sensible once in a while instead of the regular rubbish mascarading as information sites on the internet, cheers
Very informative text. I’ve found your blog by accident but I’m really happy that i did. You have some really good info on here:)
I like the layout of your blog and I’m going to do the same thing for mine. Do you have any tips? Please PM ME on yahoo @ AmandaLovesYou702
This is an interesting blog you have her but I can’t seem to find the RSS subscribe button.
Thanks for sharing this group of lesson learned, you have added a few points that I need to go away and consider.
Hi excellent website yea nice job our website will soon be adding reviews on websites and add them to our websites as the top best 25 websites to visit we also do reviews on Consumer Reports reviews all types of reviews thank you
This is a great blog you got here. The theme looks nice, awesome color combination.
For some reason only half of the post is being displayed, could it be my browser or the website?
Great article I’ve just added to my bookmark list.
Hi, You have some really good articles on your blog. I also like the theme and the layout as well. excellent work!
although I squander the majority of my time on the internet using video games like myspace poker or mafia wars, I still like to take some free time to take a look at a couple of information sites now and then and I’m contented to report this latest page is frankly pretty good quality and noticeably improved than 50 % the other junk I read today , at any rate i’m going to take up a couple of rounds of zynga poker
I Like this site your article is very nice , Thanks, very interesting article, keep up it coming
I like your writing style, and I’m hoping for more posts like this one.
Aloha! I want to say gracias for an interesting entry about a something I have had an interest in for many years now. I have been lurking and reading the posts frequently and just wanted to thank you for providing me with some insterestin articles. I look forward to reading more, and taking a more active role in the conversations on your site.
It?s a great web page you’ve here,
That rss page on your blog here is splendid, you should tell more folks about it in your upcoming post. I haven’t noticed it for the first couple of times, now I’m using it each morning to check on any updates. I’m on a real slow dial-up link in Ohio and it’s rather baffling to sit there and wait for such a long time ’til the page loads… but hey, I just found your rss page and added it to the Google Reader and there you are… I’m always up-to-date! Well buddy, keep up the good work and make that rss button a little bigger so that other people can enjoy that as well
Very shorts, simple and easy to understand, bet some more comments from your side would be great
Thanks for this post, Helped me out, Very good!
. I am a computer technician, if you want to you can take a look at my recent article on cleaning up Slow computers. Best regards Richard Nordstrom
Awesome, I been looking for this information like from days. I been through lots of them to get my knowledge pool upgraded, well I must say, thi9s has really been awesome. Well I must say it will make my information really double. Good information like this is worth bookmarking and reading like 10 times! Thanks.
my God, i thought you were going to chip in with some crucial insght at the end there, not leave it without an summary.
You made some good points there. I did a search on the topic and found most people will agree with your blog.
Great post, many amusing points. I believe 6 of days ago, I have viewed a similar blog.
It is simple to see that you are passionate about your writing. Great job!
hey nice little blog site ya have here
I apply the matching template on my own yet unfortunately for what ever reason it looks to stream more rapid on your blog eventhough this blog is carrying far more content. Have you been implementing any kind of plugins or widgets that will quicken it up? If you could have the plug ins so maybe I could use these in my own web page so twilight new moon followers could watch twilight breaking dawn online trailers and videos more easily I’d always be grateful – thank you ahead of time
Hi, thanks so much for these tips! My blogs usually do bring readers and responses. One thing I do is engage with the readers. Answer questions in responses and make clarifications where needed. I think they appreciate that I take the time to talk to them.
I just found this blog in yahoo, looks great. Will have to subscribe.
I’m going to coat-tail on what “Very Evolved” said… The way you connect to your audience is… Know who you are writing to. You need to pick a Target Audience and stick to them. You wouldn’t write to an audience of 14yr olds the same way you would write to an audience of 60yr olds.
I love it,Excellent article.I am decide to put this into use one of these days.Thank you for sharing this.To Your Success!
I see a great improvement in your writing, I’d love to get in touch. Keep up the great work! Your writing is very inspirational for someone who is new to this type of stuff.
I must say, I enjoy this blog. Maybe you could let me know how I can keeping up to date with it? I feel I should let you know I discovered this website through MSN.