update
This commit is contained in:
@ -90,6 +90,8 @@ def LocationInBound(request):
|
|||||||
else:
|
else:
|
||||||
locs = Location.objects.filter(geom__within=pl)
|
locs = Location.objects.filter(geom__within=pl)
|
||||||
res = Location.objects.filter(geom__within=pl)
|
res = Location.objects.filter(geom__within=pl)
|
||||||
|
if len(res) > 50:
|
||||||
|
return JsonResponse({"too_many_points": True}, safe=False, status=500)
|
||||||
serializer = LocationSerializer(res, many=True)
|
serializer = LocationSerializer(res, many=True)
|
||||||
return JsonResponse(serializer.data, safe=False)
|
return JsonResponse(serializer.data, safe=False)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user