An autocomplete for MUI is enhanced by parsimap geocode service.
title | type | default | description |
---|---|---|---|
token |
string |
undefined |
A generated token by map token |
title | type | default | description |
---|---|---|---|
value |
IPlace |
undefined |
A searched result item as a geocode place |
mapViewPort |
ViewPort |
undefined |
A viewPort which is retrieved from map |
onChange |
function |
undefined |
update value can be accessed |
- The documentation is rewrite in the case of separation the optional and required arguments.
import MuiGeocodeAutocomplete, {IGeocodePlace} from '@parsimap/mui-geocode-autocomplete';
const App = () => {
function handleGeocode(state: IGeocodePlace) {
}
return (
<MuiGeocodeAutocomplete
token={token}
value={place}
mapViewPort={viewPort}
onChange={handleGeocode}
/>
)
}
export default App;