12/5/2016 - 6:37 PM

	<script src="			key=AIzaSyDZ6XbYRGNa2Er0Egh16G4A65dLH2cb2ZY&sensor=false"></script><!-- google map api javascript link-->

    function initialize()
        var lat  =document.getElementById('lat').value;
        var long = document.getElementById('long').value;
       	var add = document.getElementById('add').value;//text to b appeared in the Infowindow
        if(lat && long){
            var myCenter = new google.maps.LatLng(lat,long);
            var mapProp = {
                zoom:5,      //increase zoom value to zoom map 

            var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);// id of the div where map has to be displayed

            var marker = new google.maps.Marker({

            var infowindow = new google.maps.InfoWindow({
                content:add //assigning the variable add to infowindow
		//mouseover indicates,infowindow to be appeared on mouse over.You can also try 'click'
            google.maps.event.addListener(marker, 'mouseover', function() {

    google.maps.event.addDomListener(window, 'load', initialize);// to load map window on page load

 <div id="googleMap" style="height: 350px;"> <!--div where the map is displayed-->
	 	<input type="hidden" name="lat" id="lat" value="<?php echo $lat; ?>" />
                <input type="hidden" name="long" id="long" value="<?php echo $long; ?>" />
 		<input type="hidden" name="add" id="add" value="<?php echo $address; ?>" /></div>
		$state ="tamilnadu";//Give ur example
		$city =  "chennai";//Give ur example
	    $address        = $city." ".$state; 
            $url            = "$address&sensor=false";
            $get_map        = file_get_contents($url);
            $google_map     = json_decode($get_map);
            $lat            = $google_map->results[0]->geometry->location->lat;
            $long           = $google_map->results[0]->geometry->location->lng;