コード例 #1
0
    def get(origin, destination, sig=None, output="JSON", callback=None):
        origin_string = str(origin[0]) + "," + str(origin[1])
        destination_string = str(destination[0]) + "," + str(destination[1])
        url = WALKING_URL + "?key=" + KEY + "&origin=" \
              + origin_string + "&destination=" + \
              destination_string
        if sig:
            url += "&sig=" + sig
        if output:
            url += "&output=" + output

        if callback:
            url += "&callback=" + callback
        return OHHOHttp.get(url)
コード例 #2
0
 def get(longitude, latitude):
     url = "http://restapi.amap.com/v3/geocode/regeo?" \
           "location=" + str(longitude) + "," + str(latitude) + \
           "&key=" + KEY + "&radius=1000&extensions=all"
     return OHHOHttp.get(url)
コード例 #3
0
ファイル: ohho_poi.py プロジェクト: yangxiaodong1/ohyang
    def get_poi_by_longitude_and_latitude(longitude, latitude, poitype="", radius="1000", extensions="base", batch="false", roadlevel="0",output="JSON"):
        location = longitude + "," + latitude
        url = URL + "?key=" + KEY + "&location=" + location + "&radius=" + radius + "&extensions=" + extensions

        data = OHHOHttp.get(url)
        return data