Skip to content

geocodeearth/autocomplete-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Geocode Earth autocomplete demo

Demo link

This is a minimal demo of using autocomplete with the nextzen/leaflet-geocoder plugin. It handles most of the work for you and should work out of the box with any Leaflet map.

Utilizing search and autocomplete effectively

The leaflet-geocoder plugin sends requests generated by a keypress to /v1/autocomplete, but on enter, sends a request to /v1/search. This ensures the low-latency, partial input aware autocomplete endpoint is used most of the time. The /v1/search endpoint, which has enhanced logic for complete inputs, is used when necessary.

Signup

To get your own API key to add autocomplete to your website, visit Geocode Earth.

Running locally

python3 -m http.server 8800