# react-amap-plugin-autocomplete **Repository Path**: solayy/react-amap-plugin-autocomplete ## Basic Information - **Project Name**: react-amap-plugin-autocomplete - **Description**: Autocomplete Plugin for react-amap - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-11 - **Last Updated**: 2021-08-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Autocomplete Plugin for [react-amap](https://elemefe.github.io/react-amap/) Usage: ``` npm install react-amap-plugin-autocomplete ``` Configurable props: Visit [AMap doc](https://lbs.amap.com/api/javascript-api/reference/search#m_AutocompleteOptions) for details about **ALL** prop; ``` import { Map } from 'react-amap'; import Autocomplete from 'react-amap-plugin-autocomplete'; const pluginProps = { input: // optional ... } // inner input element style const style = { ... } // on select item selectfunc = (e) => { if(e.poi.location) { this.setState({center:{longitude: e.poi.location.lng, latitude: e.poi.location.lat}}) } } // render this.selectfunc(e)} style={style} placeholder='搜索'/> ```