update
This commit is contained in:
@ -145,7 +145,7 @@ def CatView(request):
|
||||
|
||||
if(lat1 != None and lon1 != None and lat2 != None and lon2 != None and lat3 != None and lon3 != None and lat4 != None and lon4 != None):
|
||||
pl = geos.Polygon(((lon1, lat1), (lon2, lat2), (lon3, lat3), (lon4, lat4), (lon1, lat1)), srid=4326)
|
||||
//locs = Location.objects.filter(geom__within=pl)
|
||||
#locs = Location.objects.filter(geom__within=pl)
|
||||
c = Location.objects.filter(geom__within=pl).values('category').distinct()
|
||||
serializer = LocationCatSerializer(c, many=True)
|
||||
return JsonResponse(serializer.data, safe=False)
|
||||
|
||||
Reference in New Issue
Block a user