dceejay / RedMap

A web map app for Node-RED to put blobs on
Apache License 2.0
110 stars 60 forks source link

Question - Address Autocomplete #280

Open grawsom opened 3 months ago

grawsom commented 3 months ago

@dceejay When seeing all of those posibilties out there (Leaflet, Maptiler, Geoapify etc. ), I was thinking....... Would love to see in Worldmap to use Address Autocomplete both as internal search on the map, and also external (eg text input box). Is this something for the future? Or do I need to use different map solution?

/ Ivan

dceejay commented 3 months ago

Hi sorry - not quite sure what you mean... Address of what ? where in the app ?

grawsom commented 2 months ago

Hi Dave

It's like when using googlemaps etc. and you want to fill out an address, it will begin to "surgest".

So I'm in the search to find something that works together with Node-RED, and it has a map (and I like worldmap), where I can get some kind of name, lan and lon - to pass on for another app.

I have found some examples on Leaflet's page.

https://leafletjs.com/plugins.html Geocoding from MapTiler Demo: https://docs.maptiler.com/leaflet/geocoding-control/

dceejay commented 2 months ago

got it - let me think.

dceejay commented 2 months ago

I thought I had already implemented this - and yes I have (sort of) - if you are online and enter a place name in the search box the map will pan to that location. - It doesn't do auto-suggest though yet.

https://github.com/user-attachments/assets/6f09ac3a-75de-4a64-9d30-c1f93443c622

I'm not going to use the Maptiler API as that required you to have an account/API key - so will need to see if there is another alternative.

dceejay commented 2 months ago

@grawsom - I've had a look - and the issue with the Nominatum service I am using is that it only return exact search matches... there has been a request for it to return fuzzy matches open for a long long time so I can't see it being fixed any time soon.

So looking at alternatives the best I have found so far is https://photon.komoot.io that does seem to give a list of sensible answers IE best exact match first but reasonable close matches next - BUT for me at least it seems to sometimes go very slow - eg 5-10 seconds per request... so not exactly useful for type-ahead suggestions...

So I will keep looking - any suggestions gratefully received.