whosonfirst / whosonfirst-www-boundaryissues

Boundary Issues is a web-application for editing Who's On First data.
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Redo search in current map view & show more results #97

Open nvkelso opened 8 years ago

nvkelso commented 8 years ago

I'd like a function that redoes the search based on the current map view bounding box.

I know about the businesses around my house and a few other areas in SF. Sometimes those are wholly contained by a neighbourhood, sometimes those places cross neighbourhood boundaries (and include say 2 or 3 neighbourhoods on a boundary). I'd like a short list of features that are "nearby" these areas so I can (bulk) tick off status of which are current, closed, funky, etc. The bulk status update exists today, +1.

When they are wholly contained, there might be 250 results in Noe Valley, but because they are paginated I can't see all the venues in the map view at the same time without going between the pages.

When my region crosses boundaries I have to investigate each neighbourhood sequentially, and suffer from the same paginations issues as above.

I generally pan to an area I know about, zoom in, and want to see "all" the businesses there. Leaflet can handle more pins on the map, maybe make the number of results per page configurable? Seems to default to 36 now, enable 50, 100, 150, and 200 as well?

thisisaaronland commented 8 years ago

This feels related to https://github.com/whosonfirst/whosonfirst-www-boundaryissues/issues/89

dphiffer commented 8 years ago

That was my initial thought, but #89 is: "when adding/editing things, show what's nearby more intelligently." This ticket sounds like two enhancements:

thisisaaronland commented 8 years ago

Per page results stuff can be tweaked by passing $args['per_page'] to the underlying search function:

https://github.com/whosonfirst/whosonfirst-www-boundaryissues/blob/flamework/www/include/lib_elasticsearch.php#L13-L24

This fiddly-bits are:

thisisaaronland commented 8 years ago

Start with plain-vanilla bounding box (aka "math" not "geometries") queries for geom:centroid contained by four corners.

dphiffer commented 8 years ago

BTW, per_page functionality is in BI now, but the other stuff isn't.

thisisaaronland commented 7 years ago