smeijer / leaflet-geosearch

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

provider: Geocode Earth #296

Closed missinglink closed 2 years ago

missinglink commented 2 years ago

as mentioned in https://github.com/smeijer/leaflet-geosearch/pull/295, this PR adds the provider Geocode Earth which is an extension of the Pelias provider from that PR.

this PR is based on https://github.com/smeijer/leaflet-geosearch/pull/295, so it's probably easiest to merge that first or just check out the second commit to see the diff.

missinglink commented 2 years ago

If someone from the maintainers team wants to sign up for a trial at https://geocode.earth, you can send me the email address used and I'll upgrade the account from a trial to a donation :bow:

That way you can create keys for GATSBY_GEOCODEEARTH_API_KEY without worrying about being charged.

missinglink commented 2 years ago

I plan to rebase this against https://github.com/smeijer/leaflet-geosearch/pull/295 and clean it up before bringing it out of draft.

@smeijer do you know how I can get rid of this eslint error for the variable named api_key (which is inherited from the provider and can't be changed)?

missinglink commented 2 years ago

Cool this is ready to go, please feel free to ping me for a free FOSS account upgrade for the Gatsby key.

On a more personal note, we just recently landed this PR from a Dutch contributor to improve address parsing in 🇳🇱

smeijer commented 2 years ago

Thanks! Looking great!

I might ping you for that key when I have a bit more time at hand. 👍

smeijer commented 2 years ago

I've published https://github.com/smeijer/leaflet-geosearch/releases/tag/v3.6.0, which includes this pull.

missinglink commented 2 years ago

Hi @smeijer I'd like to get the live demo working, is there anything I can do to help with that?

smeijer commented 2 years ago

Then I'd need that API key I think. If you have Twitter, that's by far the fasted way to reach me (@meijer_s), alternatively, you can find my email on my github profile.

That api key can be public right? Can you restrict it to the https://smeijer.github.io domain?

missinglink commented 2 years ago

I think its easiest if you sign up for an account and control it yourself (you can configure the domain after registering). https://app.geocode.earth/users/sign_up

smeijer commented 2 years ago

geocode_earth now works, pelias does not.

missinglink commented 2 years ago

cool thanks, since Pelias is self-hosted we could either use the same api_key and host configuration as GeocodeEarth (as a sort of global demo) or leave it as-is where it returns no results for most people but works for developers running a local server.

eg it actually works fine for me because I have a local server running at http://localhost:4000/

Screenshot 2021-10-18 at 20 35 51