Closed Ettapp closed 6 years ago
I filtered the stations to use the first one with valid coordinates instead of "just the first one" and it solved the issue.
Pull request: #102
I'm now wondering if this could happend in the "Search for transport stops by stop name / line" feature... Should investigate.
Location
In the touchpad-voice app.
Description
This issue appears if the #99 is solved When searching for transport stops near to the last selected (by touch) location with the vocal command "transport stop" (whitout transport line name at the end of the vocal command), every indications that aim to help the user to find the nearest transport stop tells things like "9'000km below".
Reproduction procedure
Possible origins
When looking at the Chrome DevTools we can see that the near transport stop search request's answer contains many results, ordered by proximity. Each results but the first folow this structure:
The first result looks different than the others as it has
null
as value for bothx
&y
properties, and it'sid
isnull
too.After trying others address near to others transport stops, it seems that the first result is the "exact" address of the selected point (the address of the nearest street number, that is used to look for nearests transport stops).
Possible ways to fix the issue
Look for the first address (if any) in the request's response that has coordinates.
Comment
That would not happend if ArcGIS JS API where using TypeScript with non-null types ;-)