Search

LM. Search

地图元素属性查询。

Constructor

Description:
  • 构造方法。

Parameters:
Name Type Description
options object
Properties
Name Type Description
code string

地图编码。

url string

地图数据路径,可以是相对目录或者请求链接。

success function

初始化成功回调,在回调方法触发后才能使用查询方法。

failed function

初始化失败回调。

Methods

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