adobe photoshop 60 download

Adobe Premiere Pro CS5 discount free adobe dream weaver 8 download free download adobe distiller cheapest adobe photoshop free download full version where does adobe save download video files

adobe bridge download

Adobe Creative Suite 4 for Mac buy cheap download adobe photoshop elements 5 adobe download free premiere pro buy cheap adobe acrobat 8 download purchase adobe photoshop cs3 extended full download

free adobe download manager

buy cheap Adobe cs5 Design Premium for Mac adobe acrobat reader 6 0 1 free download adobe flashplayer download softpedia discount download adobe after effects download adobe after effects

free download adobe illustrator 9

cheapest Adobe cs5 for Mac adobe cs2 download free crack key generator how to download adobe flash movies cheapest adobe acrobat reader free download adobe 8 free download

free adobe download

Autodesk AutoCAD cheapest adobe download free premiere adobe distiller free download discount download adobe flashplayer free adobe download manager download

adobe audition 1 5 download

cheap AutoCAD Architecture adobe acrobat 8 free download adobe creative suite 2 download cheapest download adobe premiere pro cs3 download adobe reader cd

adobe encore menu download

cheapest Adobe Captivate CS5.5 download adobe ebook reader adobe photoshop elements 3 for mac download cheap download adobe photoshop 7 download adobe flash player

download adobe reader latest version

discount Creative Suite 5.5 download adobe photoshop cs2 adobe photoshop 8 free download full version discount download free adobe standard adobe flas player 9 download

download adobe photoshop mac free

Autodesk AutoCAD discount free adobe 8 download free download of adobe pagemaker buy cheap adobe dream weaver 8 download download adobe scanner

adobe reader download for mac

discount AutoCAD 2010 free adobe download free download of adobe reader buy cheap free download adobe photodeluxe home edition adobe flash player 8 download

adobe lightroom download

AutoCAD LT 2012 buy cheap adobe golive cs2 download freeware adobe acrobat download cheap adobe flash activex download download adobe flashplayer

adobe flash 9 download

adobe acrobat x buy cheap adobe free download software download adobe photoshop cs2 cheap download adobe audition 3 free adobe premiere download

adobe flash offline download

adobe creative suite 5 discount download adobe acrobat reader 8 adobe 9 download discount free adobe photoshop elements 6 download download adobe reader pdf free

search adobe reader 7 0 download

cheap adobe cs5 adobe acrobat writer free download adobe fine reader free download cheap adobe player download center adobe professional download

download adobe flashplayer free

Adobe cs5 Design Premium cheapest where free download adobe acrobat free download of adobe reader buy cheap adobe flash 7 download download adobe reader8

free adobe acrobat writer download

Adobe eLearning Suite cheap download adobe active x download adobe acrobat 7 updates discount download adobe flash 9 for h264 free adobe pdf maker download

adobe photo plus 6 download

discount Adobe eLearning Suite 2 download adobe photoshop cs2 adobe illustrator full crack download cheapest adobe photoshop download site adobe acrobat raeder v7 download

adobe flash player download for windows vista

discount Adobe Flash Catalyst CS5 adobe photo editor download adobe reader 6 free download discount download adobe flashplayer free free download adobe illustrator 9

adobe shockwave player download

discount Adobe Indesign CS5 free adobe dream weaver 8 download adobe photo free download cheapest adobe flash player downloader free download hunter grabber free adobe profesional 8 download

adobe type manager download free

discount Adobe Photoshop CS5 download adobe acrobat reader free old adobe software download discount download adobe flash player stand alone adobe acrobat update download

Google Map Integration using Javascript | PHP

Many of you would have wondered how we can integrate google maps to your web application .  This tutorial would help you to do the same in a simple way using javascript and php . I am providing you a detailed description of Google Map Integration .

Your First Map

You need to get a Google Map API to continue . You can register here for a Google Map API key .

Incorporating a Google map into your website is surprisingly easy, accomplished with just a few lines of code. Begin by copying and pasting the following snippet into an HTML file, remembering to replace ADD_YOUR_KEY_HERE with your own API key. Then save and upload the file to a Web server.


<!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=ADD_YOUR_KEY_HERE" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 400px; height: 300px"></div>

<script type="text/javascript">
var map = new GMap(document.getElementById("map"));
map.centerAndZoom(new GPoint(-83.022206, 39.998264), 3);
</script>

</body>
</html>

The output of above code is

Adding Mapping Markers

The maps are really useful. However, their utility can be taken to the next level by overlaying markers indicating a specific location or set of locations on the map . You just need to know the longitude and latitude of the location .

<!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=ADD_YOUR_KEY_HERE" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 400px; height: 300px"></div>

<script type="text/javascript">
var map = new GMap(document.getElementById("map"));
var point = new GPoint(76.2739795,9.9211342);
map.centerAndZoom(point, 3);
var marker = new GMarker(point);
map.addOverlay(marker);
</script>

</body>
</html>

The output of Google Mapping Marker code is

Adding Description Marker

Google Map API provide provision to add description along with the marker you add . We just need the latitude and longitude of the location we are mapping .


<!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=ADD_YOUR_KEY_HERE" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 400px; height: 300px"></div>

<script type="text/javascript">
var map = new GMap(document.getElementById("map"));
var point = GPoint(76.27562,9.97943);
var address = 'Marine Drive | GCDA complex | Cochin';
var mark = createInfoMarker(point, address);
map.addOverlay(mark);

function createInfoMarker(point, address) {
 var marker = new GMarker(point);
 map.centerAndZoom(point, 3);
 GEvent.addListener(marker, "click",
 function() {
 marker.openInfoWindowHtml(address);
 }
 );
return marker;
}
</script>

</body>
</html>

The output of the above code plots the map with a description

Conclusion

I have given you a brief description on google API usage . If you need more info on it you can review API documenation .

Hope the tutorial have helped you to implement Google Maps in your application .

Note : In all above examples we plotted the map using longitude and latitude value .

We can get latitude and longitude from an address using  PHP – geocoding – I have explained it here .

About the Author: a holistic web developer , movie buff and technical blogger from queen of arabian sea.

RSSComments (22)

Leave a Reply | Trackback URL

  1. emt training says:

    Wow this is a great resource.. I’m enjoying it.. good article

  2. Tejbahadur says:

    after adding the api key javascritp is prompting a error like firstchild is null and map is not displayed in my application.the web application is http://localhost/testing/test.php . please suggest the way

  3. Sreeraj says:

    Its very useful
    Thanks

  4. Sachu says:

    Using this Code error Came .

  5. sujikumar says:

    i’m a java programmer,but i need your help..i’m sending you an email with problem description..kindly help me

  6. sujikumar says:

    pls.. am a beginer to this field,dont forget to check my mail and give solution

  7. Evancho says:

    I was a bit interested how can I add more places in my google map but couldn’t find it how. Actually this explained some basic things that helped me to do it. Thank you!

  8. Mohammed umar says:

    HI the above code showing map but it not showing zoom in and out and other functionality part i have seen in other site like http://footkey.com/stadium so what i do to impliment that kind of function

  9. Liliana says:

    Your site looks great! Love the lbog.. If you are interested im any web design feel free to contact me at http://vadoz.ru

  10. Excellent article i am sure that i will come back here soon

  11. Thanx for this, Google Maps is a powerful tool.

  12. Very useful post on google maps, Thank you so much for sharing.

  13. martin says:

    can u pls add how to include the zoom opiton

  14. Achey Dosth says:

    Could you please tell me what is the difference between these 2 lines:

  15. John kipson says:

    In this site is very much useful for mapping functions

  16. Pradeep says:

    Thanks, this article was useful, I created first google map today.

  17. Jhon says:

    Itz is not working in my application

  18. Manoj says:

    Hi,

    I want to know trace location on Google Map using mobile phone number.

    Any one can help me !!!

    Thanks

    Manoj Soyal

  19. nice tutorial, but where the php comes here?

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes