Constructor
new Search(options, success, failed)
- Description:
构造方法。
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
|||||||||
success |
function | 初始化成功回调,在回调方法触发后才能使用查询方法。 |
|||||||||
failed |
function | 初始化失败回调。 |
Methods
search(request) → {array.<LM.Search.SearchResult>}
- Description:
查询方法
Parameters:
| Name | Type | Description |
|---|---|---|
request |
LM.Request |
Returns:
楼层查询结果数据。
- Type
- array.<LM.Search.SearchResult>
Type Definitions
SearchResult
- Description:
按楼层组织的查询结果数据。
Properties:
| Name | Type | Description |
|---|---|---|
level |
number | 楼层级别。 |
layers |
array.<object> | 图层数组。 |
layers[].type |
LM.Type | 图层类型。 |
layers[].properties |
array.<object> | 元素属性集合。 |
layers[].properties[].code |
string | 唯一编码。 |
layers[].properties[].classcode |
number | 分类编码。 |
layers[].properties[].cname |
string | 中文名称。 |
layers[].properties[].ename |
string | 英文名称。 |
layers[].features |
array.<object> | 地图元素集合,需要使用matchFeatures方法进行匹配。LM.Map#matchFeatures |
按楼层组织的查询结果数据。
Type:
- object