Find a Pinpoint On Map Using Address In Php
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<meta charset=utf-8 />
<title>Welcome to JS Bin</title>
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
<script>
$(document).ready(function(){
var src =$("address").text();
/*$("#map").attr("src","https://www.google.co.in/maps/place/NCrypted+Technologies/@22.280131,70.799031,15z/data=!4m2!3m1!1s0x0:0xb5f28739a2446f67?sa=X&ved=0CHkQ_BIwC2oVChMIh6f12bLuxgIVBiaUCh2Bjggs");
*/ $("address").each(function(){
var embed ="<iframe width='425' height='350' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com/maps?&q="+ encodeURIComponent( $(this).text() ) +"&output=embed'></iframe>";
$(this).html(embed);
});
var src =$("#address").text();
var src1 =$("#address1").text();
/*$("#map").attr("src","https://www.google.co.in/maps/place/NCrypted+Technologies/@22.280131,70.799031,15z/data=!4m2!3m1!1s0x0:0xb5f28739a2446f67?sa=X&ved=0CHkQ_BIwC2oVChMIh6f12bLuxgIVBiaUCh2Bjggs");
*/ $("address").each(function(){
var embed ="<iframe width='425' height='350' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com/maps?&q="+ encodeURIComponent( src+src1 ) +"&output=embed'></iframe>";
$(this).html(embed);
});
});
</script>
</head>
<body>
<address>246 Serra Way
246 Serra Way, Milpitas, CA 95035, USA
</address>
<p id="address">India Date</p>
<p id="address1">Delhi</p>
</body>
</html>
Output:
Comments
Post a Comment