smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.05k stars 273 forks source link

Fix failing search for OSM and LocationIQ, fix #144 #145

Closed francislavoie closed 7 years ago

francislavoie commented 7 years ago

See #144 for discussion

I have not tested this, I don't have a proper dev environment to be able to build.

Overview of the changes:

I didn't write any additional tests, but I figure that it might make sense to do so, adding a case where a result from a previous test is passed to search.

francislavoie commented 7 years ago

I managed to figure out how to build it with yarn install.

I found an additional bug with my implementation in doing so, reverse only returns a JSON object (since it's a single result) rather than an array, so I needed to wrap the result in an array before passing it to parse.

I tested it with my application, and this seems to fix the issue for me.

smeijer commented 7 years ago

Looking good to me. Thanks!