Created
December 12, 2015 19:23
-
-
Save anonymous/7d2b7eb93b89605f0705 to your computer and use it in GitHub Desktop.
Geo Bin // source http://jsbin.com/voqavokabe
This file contains hidden or 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
| <!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> |
This file contains hidden or 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
| 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