pelias / leaflet-plugin

Add Pelias geocoding to your Leaflet map.
https://pelias.github.io/leaflet-plugin
MIT License
193 stars 60 forks source link

Support a minimum query length #183

Open orangejulius opened 4 years ago

orangejulius commented 4 years ago

Very short autocomplete queries (one or two characters) are often not particularly helpful. Many autocomplete interfaces support a minimum input length, below which a query won't be sent to the underlying search backend, and instead a message (something like "enter 1 more character to search...") will be displayed.

We should support something similar.

missinglink commented 4 years ago

This is implemented in the code but not configurable: https://github.com/pelias/leaflet-plugin/blob/master/src/core.js#L23