#!/usr/bin/python # encoding:utf-8 import urllib2, json, urllib # 1、坐标系转换 data = {} data["appkey"] = "your_appkey_here" data["lat"] = "30,31" data["lng"] = "120,121" data["from"] = 1 data["to"] = 2 #1 WGS坐标系、2 火星坐标系(谷歌、高德、腾讯等)、3 百度坐标系、4 伪墨卡托坐标系 url_values = urllib.urlencode(data) url = "https://api.jisuapi.com/coordconvert/convert" + "?" + url_values request = urllib2.Request(url) result = urllib2.urlopen(request) jsonarr = json.loads(result.read()) if jsonarr["status"] != u"0": print jsonarr["msg"] exit() result = jsonarr["result"] print result["lat"],result["lng"],result["from"],result["to"] for val in result["list"]: print val["lat"],val["lng"]