Closed clhenrick closed 7 years ago
Some UI / UX mocks for reference:
See the new function findNearestSegmentToLatLng()
which should do the first of these: asynchronously find the nearest segment to a given latlng, and return it to your callback. This should be suitable for selection of points by location.
Segments returned by findNearestSegmentToLatLng()
now include closest_distance
in addition to the lat, lng, id, and title. This saves some code on the caller's side of calculating the distance, and of storing the selected point separately in state.
The structure now includes metadata (a properties
on the document itself) of the actual and desired starting and ending points, the distance from the requested points and trail points, and the total mileage. This is documented in the code, and the demo shows their usage in Leaflet.
The UX flow for routing is as follows:
So we will have to break out some of the routing logic for finding the nearest ECG segment to a geocoded search.
cc @gregallensworth