<!-- copyright (c) 2009 Google inc.
You are free to copy and use this sample. License can be found here: http://code.google.com/apis/ajaxsearch/faq/#license-->
<!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" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps API Sample</title> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></script> <script type="text/javascript">
var map = null; var geocoder = null; function showAddress(address) { map = new GMap2(document.getElementById("map_canvas")); geocoder = new GClientGeocoder();//alert(address);//var address ;//address ='3,madurai street,perambur'; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 13); var marker = new GMarker(point); map.addOverlay(marker); map.setUIToDefault(); marker.openInfoWindowHtml(address);
} } ); } }</script>
</head> <body onload="showAddress('Ramakrishna Math,mylapore,chennai')" style="font-family: Arial;border: 0 none;"> <p> <input type="text" size="60" name="address" value="1600 Amphitheatre Pky, Mountain View, CA" /> <input type="submit" value="Go!" /> </p>
<table border=2 bgcolor="green"><tr><td> <div id="map_canvas" style="width: 500px; height: 300px"></div></td></tr></table>
</body></html>
Wednesday, August 5, 2009
Subscribe to:
Posts (Atom)