Created
September 16, 2009 02:38
-
-
Save vincentisambart/187828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>test</title> | |
<script src="http://maps.google.co.jp/maps?file=api&hl=ja&v=2&sensor=false&key=ABQIAAAAaGrpYL1xB0gxisU-6UlcSRT6suOry0oJYFaXw8CSwv7fUN3XBxSly8NKZzOwK3Ypuaq7h2eHx9UNCg" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function init() { | |
var div = document.getElementById('mydiv'); | |
var geocoder = new GClientGeocoder(); | |
geocoder.setBaseCountryCode('jp'); | |
geocoder.getLocations(new GLatLng(35.660617498849, 139.72924947738647), function (response) { | |
if (response && response.Status.code == 200) { | |
var html = ''; | |
for (var i = 0; i < response.Placemark.length; ++i) { | |
html += '<br />address: ' + response.Placemark[i].address; | |
} | |
div.innerHTML = html; | |
} | |
}); | |
} | |
</script> | |
</head> | |
<body onload="init()"> | |
<div id="mydiv"></div> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment