Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function convert_to_latlong(address)
- {
- console.log("Line 271");
- var geocoder = new google.maps.Geocoder();
- geocoder.geocode( { 'address': address}, function(results, status)
- {
- if (status == google.maps.GeocoderStatus.OK)
- {
- var latitude = results[0].geometry.location.lat();
- var longitude = results[0].geometry.location.lng();
- console.log(latitude, longitude);
- }
- });
- }
- $(document).ready(function()
- {
- var address = convert_to_latlong('Empire State Building, NY');
- console.log("Address: ", address.latitude);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement