mirror of https://github.com/tidwall/tile38.git
Apply limit on top of cursor
This commit is contained in:
parent
4eca0cdee7
commit
1084c60805
|
@ -352,7 +352,7 @@ type iterItem struct {
|
|||
}
|
||||
|
||||
func nearestNeighbors(sw *scanWriter, lat, lon float64, iter func(id string, o geojson.Object, fields []float64, dist *float64) bool) {
|
||||
limit := int(sw.limit)
|
||||
limit := int(sw.cursor + sw.limit)
|
||||
var items []iterItem
|
||||
sw.col.NearestNeighbors(lat, lon, func(id string, o geojson.Object, fields []float64) bool {
|
||||
if _, ok := sw.fieldMatch(fields, o); ok {
|
||||
|
|
Loading…
Reference in New Issue