def getHeadPointRedZone(): mapName = request.form.get('mapName') dBUtil = DBUtil() datas = dBUtil.query("select * from zk_redzone where map='%s'" % mapName) pointData = [] for data in datas: pointData.append({ 'lat': data[1], 'lng': data[0], 'count': data[2] / 10 + 1, 'radius': data[2] / 10 + 4 }) return str(json.dumps(pointData, check_circular=False, ensure_ascii=False))
def getHeadPointLastPoisonCircle(): mapName = request.form.get('mapName') dBUtil = DBUtil() datas = dBUtil.query( "select * from zc_lastpoisoncircle where map='%s' ORDER BY num desc limit 500" % mapName) pointData = [] for data in datas: pointData.append({ 'lat': data[1], 'lng': data[0], 'count': data[2] + 20, 'radius': data[2] + 10 }) return str(json.dumps(pointData, check_circular=False, ensure_ascii=False))