Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2015 19:23
Show Gist options
  • Select an option

  • Save anonymous/7d2b7eb93b89605f0705 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/7d2b7eb93b89605f0705 to your computer and use it in GitHub Desktop.
Geo Bin // source http://jsbin.com/voqavokabe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Geo Bin</title>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAlfN-8CfofBQvgWKlI1ISwbL5oxp7bNEs&callback=initGeo" async defer></script>
</head>
<body>
<script id="jsbin-javascript">
function initGeo(){
var geocoder = new google.maps.Geocoder();
geocoder.geocode(
{'address': '3/480 Scarborough Beach Road, Osborne Park, Wa, 6017'},
function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
var reslut = results[0].geometry;
console.log(reslut.location.toJSON());
}
else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">function initGeo(){
var geocoder = new google.maps.Geocoder();
geocoder.geocode(
{'address': '3/480 Scarborough Beach Road, Osborne Park, Wa, 6017'},
function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
var reslut = results[0].geometry;
console.log(reslut.location.toJSON());
}
else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
</script></body>
</html>
function initGeo(){
var geocoder = new google.maps.Geocoder();
geocoder.geocode(
{'address': '3/480 Scarborough Beach Road, Osborne Park, Wa, 6017'},
function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
var reslut = results[0].geometry;
console.log(reslut.location.toJSON());
}
else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment