Google Map in the website Php

 

<script src='https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyARsicwTqMqTIWvMlIOKISAqvT1jPAZHY0'></script>

<div style='overflow:hidden;height:400px;width:520px;'>
    <div id='gmap_canvas' style='height:400px;width:520px;'></div>    
    <style>#gmap_canvas img{max-width:none!important;background:none!important}</style>
</div> 


</script>

<script type='text/javascript'>
function init_map(){
    var myOptions = { 
        zoom:12,
        center:new google.maps.LatLng(22.5892,88.31029999999998),
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById('gmap_canvas'), myOptions);
    marker = new google.maps.Marker({
        map: map,
        position: new google.maps.LatLng(22.5892,88.31029999999998)
    });
    infowindow = new google.maps.InfoWindow({
        content:'<strong></strong><br><br> Howrah<br>'
    });
    google.maps.event.addListener(marker, 'click', function() 
    {
        infowindow.open(map,marker);
    });
   infowindow.open(map,marker);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         }

google.maps.event.addDomListener(window, 'load', init_map);

</script>

Leave a Reply

Your email address will not be published. Required fields are marked *