def _query_for_reverse_geocoding ( lat , lng ) : # have to do some stupid f/Decimal/str stuff to (a) ensure we get as much # decimal places as the user already specified and (b) to ensure we don't # get e-5 stuff return "{0:f},{1:f}" . format ( Decimal ( str ( lat ) ) , Decimal ( str ( lng ) ) )
how do you get only latitude and longitude using geocode in python geeks for geeks
Given a lat & lng what s the string search query .
def _query_for_reverse_geocoding(lat, lng):
    """
    Given a lat & lng, what's the string search query.

    If the API changes, change this function. Only for internal use.
    """
    # have to do some stupid f/Decimal/str stuff to (a) ensure we get as much
    # decimal places as the user already specified and (b) to ensure we don't
    # get e-5 stuff
    return "{0:f},{1:f}".format(Decimal(str(lat)), Decimal(str(lng)))