<!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> <script type="text/javascript" src="http://maps.google.com/maps/api/js?key=AIzaSyDAtuVJT2weVT8ilkKfDcMwmPXe7B1HMj0"></script> <script type="text/javascript"> var map; function load() { var mapOptions = { center: { lat: 31.293514, lng: 36.191711 }, zoom: 7, mapTypeId: google.maps.MapTypeId.HYBRID }; map = new google.maps.Map(document.getElementById('map'), mapOptions); geocoder = new google.maps.Geocoder(); } function showAddress() { var address = document.getElementById("addressTEXT").value; geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); map.setZoom(14); } else { alert("Geocode was not successful for the following reason: " + status); } }); } </script> <link rel="stylesheet" type="text/css" href="http://code.google.com/css/dev_docs.css"/> </head> <body > <input type="text" size="60" id="addressTEXT" value="31.293514, 36.191711" /> <input type="button" value="Set Address" /> <div id="map" style="width: 600px; margin-removed 20px; height: 600px"></div> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)