寻息 经纬转换
This commit is contained in:
parent
1222b7be76
commit
8373f3c808
|
@ -15,7 +15,7 @@ def cache_areas_info():
|
|||
for i in Area.objects.filter(is_hidden=False).exclude(third_info__xx_rail=None).order_by('number'):
|
||||
points = []
|
||||
for item in i.third_info['xx_rail']['detail']['polygon']['points']:
|
||||
points.append((item['x'], item['y']))
|
||||
points.append((item['longitude'], item['latitude']))
|
||||
area_dict = {
|
||||
'id': i.id,
|
||||
'type': i.type,
|
||||
|
|
|
@ -456,7 +456,7 @@ def loc_change(data):
|
|||
ep_loc_dict['time2'] = int(time.time())
|
||||
ep_loc_dict['xx_detail'] = data
|
||||
|
||||
area_fix, area_temp = get_area_from_point(data['xMillimeter'], data['yMillimeter'], data['floorNo'])
|
||||
area_fix, area_temp = get_area_from_point(data['longitude'], data['latitude'], data['floorNo'])
|
||||
time2 = int(time.time())
|
||||
ep_loc_dict['area_temp_id'] = area_temp['id'] if area_temp else None
|
||||
ep_loc_dict['time2'] = time2
|
||||
|
|
Loading…
Reference in New Issue