Closed SachsenspieltCoding closed 5 months ago
Nice! Great idea to improve the auto complete based on previous coordinates!
Is it somehow possible to avoid using the "lower level" getQueryStore().state
and e.g. inject the queryPoints into the Geocoder class directly somehow? (Currently we are fully aware of these store
singletons, but never use them for inter-class dependencies)
Ah yes, I'll look into this :)
This should do it
Nice, thank you!
Now that I see the code: it could make more sense to pass only the point
to the geocoder request
method (the geocoder API stays "cleaner" like request(queryString, biasPoint, providerType)
) and do the extraction of the point
from the QueryPoints array once in AddressInputProps (?)
Sorry for the hassle...
I've moved the logic part out of the Geocode class, could you check if this is what you had in mind?
Thanks!
Have increased the location_bias_scale to reduce hiding results. E.g. when I first entered the location "Dresden", then "hoyer" should give us not only streets in "Dresden". Let's see if it still makes problems.
Since I found it quite annoying that the autocompletion was always based on the coordinate
0,0
, I implemented that if there is a query point above the currently selected one, these coordinates are sent together with the geocode request to the GraphHopper Geocoding API.fixes #385