寻息 经纬转换

This commit is contained in:
曹前明 2022-09-21 19:09:10 +08:00
parent 1222b7be76
commit 8373f3c808
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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