Sep 29, 2013

Ketan Patel

Google Map Integration

If you are not familiar with what Google map is then let me clear you ,Google Map is a web mapping service application and technology that is provided by Google. Google Map provides high-resolution aerial or satellite images for most urban areas all over the world.



By adding a Google map to your web site you can show  your business location and it ‘s absolutely free. So the question is how to add google map?

Below the same example can be used to integrate Google Map into your website. 


This is very simple tutorial.just carefully read it and do as mentioned.Basic requirement for this api is latitude and longitude of your location, address description and small image can be used as a point in map.


To know the Latitude and Longitude of your location go to this site :
http://itouchmap.com/latlong.html






Index.html file

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/googleMapApi.js"></script>

<script type="text/javascript">
function showGoogleMap(){
    var lat='20.593684';   // Latitude of location
    var lang='78.962880';  // Longitude  of location
    var desc='<div>'+
                  '<h1>PHP Dev Zone</h1>'+
             '</div>';
    var showImage='image/small.png';
    var imageTitle='PHP Dev Zone';
    var divId='map_canvas';
    initializeMap(lat,lang,desc,showImage,imageTitle,divId);
}
</script>

<div id="map_canvas" style="width:767px; height:500px"></div>


Download Full Source


At Last


This was very simple implementation of Google Map to Your Website.If you like this post then Please do share on social networks or leave your comment in the comment box given below.To stay updated like us on facebook.

Ketan Patel

About Ketan Patel -

I have developed a wide range of websites using CorePHP, Opencart, CakePHP and CodeIgniter including sites for startup companies and small businesses. Apart from my blogging life, I like to read Novels, Listening music and Net surfing.

Subscribe to this Blog via Email :