aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/geolocation.js
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-04-26 13:26:36 +0100
committerDave Arter <davea@mysociety.org>2018-04-26 16:37:26 +0100
commit86677908feec287449467b565f63fa2f8db7e560 (patch)
treeec9dc4c5c634b1b8c4d1d7fae595e7b15108d85d /web/js/geolocation.js
parent0d80aa2f5e71ca6de5d70d81e795124703c1c3f7 (diff)
[Buckinghamshire] Improve the site_code lookup to fetch nearest asset
The previous approach of requesting a small bounding box from the WFS server and using the first asset, if any, wasn’t sufficiently tolerant of reports that were made more than 5M away from a road, of which there were many. The problem with extending the bounding box used to fetch assets from the server is that the order of the returned assets didn’t have any bearing on their proximity to the centre of the bounding box (i.e., the location of the report). As an alternative approach this commit changes the method to instead fetch all assets within a much wider bounding box surrounding the report and iterates across the returned features in order to find the closest point and uses the site_code value from that feature.
Diffstat (limited to 'web/js/geolocation.js')
0 files changed, 0 insertions, 0 deletions