优化
This commit is contained in:
@@ -21,11 +21,17 @@ small_type = ["学校", "高等院校", "中学", "小学", "幼儿园"]
|
||||
def deal3(item):
|
||||
location = [item['lng'], item['lat']]
|
||||
item['school'] = poiutils.find_around_by_location(item['city_display'], location, small_type, 3000)
|
||||
item['kindergarten'] = poiutils.find_around_by_location(item['city_display'], location, ["幼儿园"], 3000)
|
||||
item['primary_school'] = poiutils.find_around_by_location(item['city_display'], location, ["小学"], 3000)
|
||||
item['middle_school'] = poiutils.find_around_by_location(item['city_display'], location, ["中学"], 3000)
|
||||
return item
|
||||
|
||||
def deal(item):
|
||||
location = [item['lng'], item['lat']]
|
||||
item['school'] = poiutils.find_around_by_location(item['city_display'], location, small_type, 1000)
|
||||
item['kindergarten'] = poiutils.find_around_by_location(item['city_display'], location, ["幼儿园"], 1000)
|
||||
item['primary_school'] = poiutils.find_around_by_location(item['city_display'], location, ["小学"], 1000)
|
||||
item['middle_school'] = poiutils.find_around_by_location(item['city_display'], location, ["中学"], 1000)
|
||||
return item
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user