Closed alexandervlpl closed 9 months ago
Sorry for missing this. This looks great! Thanks.
Unfortunately, CI is failing. Can you look into that?
Lol, I did it. Fixed it from my phone. 😆
Thanks again!
:tada: This PR is included in version 3.10.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Awesome, thanks for improving this. :+1:
This broke a standard submit: handleSubmit: (result) => this.onSubmit(result),
. It tries to trim
a result object that is not a string.
async onSubmit(query) {
this.resultList.clear();
const { provider } = this.options;
let results = [];
const coords = validateCoords(query); // <---- here
(...)
},
Apologies for what was clearly a bad PR, I did say it isn't ready for merging and was planning to work on it after feedback. Probably should not have submitted something so half baked. I see the concerns from @gjvoosten in #384 and they're valid.
That said, I don't think this should be abandoned because "some search providers already support coordinate searches". I think most do not, and offloading this to providers when it can be done instantly in the front end seems very inefficient.
Is it worth revisiting this, getting it TypeScripted and properly tested?
No worries, I was the one that merged the PR, so I took the responsibility :)
Happy to merge (after proper testing 😅) any other contribution you make. Thanks!
Quick, pure js implementation to handle coordinate queries (#147). If a user enters valid coordinates, they get a single result with that point (as in Google Maps and other services). It's a useful feature for power users.![image](https://github.com/smeijer/leaflet-geosearch/assets/8945883/775ac7a2-3802-44e8-a3d5-c59d91d579e6)
Any other queries are sent to the Provider. Happy to see this in TypeScript and otherwise improved, it's probably not ready for merging.