直接跳到内容
本页目录

Search Control

基础用法

API

属性

属性名说明类型默认值
position控件位置enum 'topleft'
url用于搜索查询的URLstring - (必填)
layer用于搜索查询的图层组LayerGroup null
zoom移动到搜索位置后的缩放级别,默认不改变缩放级别number null
found_style在图层组中搜索时,搜索到要素的样式object {'fillColor': '#3f0', 'color': '#0f0'}
property_name用于显示的属性名称string 'display_name'
auto_complete是否启用自动补全功能boolean true

事件

事件名说明参数类型
feature_found当要素被找到时触发-
location_found当位置被找到时触发-

插槽

插槽名说明
default用于自定义标记(marker)内容

方法

方法名说明参数返回值
----

src/examples/vleaflet/controls/Search

Search Control已经加载完毕