poi results now come out sorted by distance
This commit is contained in:
1 parent
7d1385b7cc
commit
66c222a77a
1 file changed
+1
-1
@@ -510,7 +510,7 @@ public class CarpetExpression
|
|||||||
return LazyValue.NULL;
|
return LazyValue.NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value ret = ListValue.wrap(store.get(condition, pos, (int)radius, status).map( p ->
|
Value ret = ListValue.wrap(store.get(condition, pos, (int)radius, status).sorted(Comparator.comparingDouble(p -> p.getPos().getSquaredDistance(pos))).map(p ->
|
||||||
ListValue.of(
|
ListValue.of(
|
||||||
new StringValue(p.getType().toString()),
|
new StringValue(p.getType().toString()),
|
||||||
new NumericValue(p.getType().getTicketCount() - ((PointOfInterest_scarpetMixin)p).getFreeTickets()),
|
new NumericValue(p.getType().getTicketCount() - ((PointOfInterest_scarpetMixin)p).getFreeTickets()),
|
||||||
|
|||||||
Reference in new issue
Block a user