def geocode_r():
 vars = request.post_vars
 lat = vars.get('lat', None)
 lon = vars.get('lon', None)
 results = gis.geocode_r(lat, lon)
 results = json.dumps(results, separators=SEPARATORS)
 response.headers['Content-Type'] = 'application/json'
 return results

def geocode_r ( ) : vars = request . post_vars lat = vars . get ( 'lat' , None ) lon = vars . get ( 'lon' , None ) results = gis . geocode_r ( lat , lon ) results = json . dumps ( results , separators = SEPARATORS ) response . headers [ 'Content-Type' ] = 'application/json' return results
reverse-geocode a location - designed to be called via ajax post looks up lx in our own database @todo: if not found then calls out to 3rd party services .