Control.Search
概述
搜索控件
选项(Options)
选项:
选项 | 类型 | 默认值 | 描述 |
---|---|---|---|
layer | null | null | 搜索标记所在层 |
sourceData | null | null | 搜索结果回调 |
url | String | 空 | ajax请求地址 |
jsonpParam | null | null | 通过JSONP服务的搜索JSONP参数名称 |
propertyName | String | title | 控件的属性名 |
propertyLoc | String | loc | 以像素为单位控件的最大宽度,宽度设定为整数(例如100,200,500) |
formatData | null | null | 是否显示度量刻度线(米/公里) |
filterData | null | null | 回调从文本过滤数据检索 |
callTip | null | null | 函数返回行提示的HTML节点 |
container | String | 空 | 搜索控件容器id |
minLength | Number | 1 | 最小文本长度 |
initial | Boolean | TRUE | 只用初始化的文本搜索元素 |
casesesitive | Boolean | FALSE | 区分大小写的文本搜索 |
autoType | Boolean | TRUE | 与第一个建议的结果,完整的输入选择该填充文本 |
delayType | Number | 400 | 延迟时间,打字显示工具提示 |
tooltipLimit | Number | -1 | 搜索结果提示最大限制,-1为无限制 |
tipAutoSubmit | Boolean | TRUE | 点击自动移动地图 |
autoResize | Boolean | TRUE | 根据搜索变化自动调整 |
collapsed | Boolean | TRUE | 崩溃时重启搜索 |
autoCollapse | Boolean | FALSE | 点击确认后关闭搜索 |
autoCollapseTime | Number | 1200 | 搜索自动关闭的延迟时间 |
zoom | null | null | 找到位置后变焦,默认map.getZoom() |
position | String | topleft | 控件的位置,详见control |
textErr | String | Location not found | 未搜索到时显示文本 |
textCancel | String | Cancel | 取消搜索是框内文本 |
textPlaceholder | String | Search... | 搜索框内文本 |
animateLocation | Boolean | TRUE | 在搜索结果显示圆的动画 |
circleLocation | Boolean | TRUE | 在搜索结果处绘制圆 |
markerLocation | Boolean | FALSE | 在搜索结果处绘制marker |
markerIcon | new FMap.Icon.Default() | new FMap.Icon.Default() | 搜索结果显示样式 |