vecnet / dl-discovery

Map based discovery interface for digital library records
Other
4 stars 3 forks source link

autozoom to search results seems to only include bounding boxes not points #78

Open DanielBaird opened 9 years ago

DanielBaird commented 9 years ago

e.g. search for Anopheles, the map zooms to the east african coast, ignoring the points outside that region.

dbrower commented 9 years ago

Is this a data hygiene issue? Are there bad data? Should the points be included in the bounding box?

nkmeyers commented 9 years ago

I guess we should try to reproduce that behavior & test it w some other records / queries ?

Natalie Meyers Typos by iPhone

On Jun 17, 2015, at 9:17 AM, Don Brower notifications@github.com wrote:

Is this a data hygiene issue? Are there bad data? Should the points be included in the bounding box?

— Reply to this email directly or view it on GitHub https://github.com/vecnet/dl-discovery/issues/78#issuecomment-112795447.

stevenvandervalk commented 9 years ago

I haven't had a thorough look at this since we spotted it but : I don't think it's a data issue or the existing bounding box should be changed. That is what the current code is supposed to do. This issue was made as a reminder when to add the related points to the function that determines what to include in the zoom.

stevenvandervalk commented 9 years ago

Apologies, I take that back! https://github.com/vecnet/dl-discovery/blob/qa-deploy/app/assets/javascripts/modules/vndl_map.js.erb#L366 Should already extend the bounds to include any lat/lngs from points as well as rectangles/bounding boxes.

nkmeyers commented 9 years ago

is any part of this problem related to the way auto-zoom and the records per page and the total hitlist count work together? I was wondering after demoing to Tom Burkot yesterday whether if we had default records per page be bigger than the hitlist count if this problem would get better? I know that doesn't solve the problem or scale but it might help us debug? For example if my search returns 28 records I want to see all those points on the map regardless of whether they are displayed in the records per page count set that displays in the hit-list? I think the disconnect between record count and displayed records is what makes this feel counter-intuitive to the user? They think they should see more points and they are "right"?

DanielBaird commented 9 years ago

Definitely not (just) a data issue -- the map should behave in a sensible way even when points are outside of bounding boxes, or a record doesn't have a bbox (and I still believe that if bboxes are only a box drawn around a record's points, then they're not data, they're just an artifact of optimisation and shouldn't be shown to humans).

My guess at most likely cause is that there are valid and correct bboxes being delivered to the browser, and the map code just isn't parsing them properly.

If there aren't bboxes, but there is a data policy that says the bbox should include all the record's points, there might be an additional data bug on top of the display bug. Steven and I will look at it in the next few hours and work out which is which :)

DanielBaird commented 9 years ago

@nkmeyers we had considered whether we should show every result's points, rather than just the current page's points. It's not impossible, but we'd have to work out how to do something sane when there are 5000 results, each with 20 mappable points..