地点自动补全组件配置项

interface PlaceAutocompleteOptions {
    map: Map;
    placeholder?: string;
    debounce?: number;
    location?: string;
    citylimit?: boolean;
    types?: PlaceAutocompleteType;
    minLength?: number;
    showSuggestion?: boolean;
    suggestionCount?: number;
    display?: PlaceAutocompleteDisplayOptions;
}

Properties

map: Map

地图实例,必传

placeholder?: string

输入框的 placeholder 文本,默认 "搜索地点"

debounce?: number

防抖延迟(毫秒),默认 300

location?: string

检索区域限定,城市名称(如 "北京"),不传则使用地图当前视野中心所在城市

citylimit?: boolean

是否严格限定在 location 城市范围内,默认 false

结果类型过滤,默认 'all'

minLength?: number

输入框最小触发字符数,默认 1

showSuggestion?: boolean

是否展示建议下拉列表,默认 true

suggestionCount?: number

建议列表最大显示条数。不传时移动端默认 6,桌面端不限制

下拉列表各字段显隐配置