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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
import sys, traceback | |
import json, urllib2 | |
def latlng_to_addr (lat, lng): | |
# convert given latitude & longitude to formatted address with Google Maps API | |
# ref: http://techslides.com/convert-latitude-and-longitude-to-a-street-address/ | |
maps_api_url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=%s,%s&sensor=false' % (lat, lng) | |
try: |
OlderNewer