react-geocode-earth-autocomplete
Made with create-react-library
A React component to build a customized UI for geocode.earth Autocomplete
Enable you to easily build a customized autocomplete dropdown powered by geocode.earth.
Full control over rendering to integrate well with other libraries (e.g. Redux-Form).
Basically the geocode.earth version of hibiken/react-places-autocomplete.
Installation
yarn add react-geocode-earth-autocomplete
npm install --save react-geocode-earth-autocomplete
Usage
Create your component, you'll need an api key from geocode.earth.
;; { const address setAddress = ; return <GeocodeEarthAutocomplete searchOptions= api_key: "ge-..." value=address onChange= { ; } onSelect= { // do an api call } > { <div> <input ... /> <div className="autocomplete-dropdown-container"> loading && <div>Loading...</div> suggestions </div> </div> )} </GeocodeEarthAutocomplete> ); }
License
MIT © peacefultruth