室内地图,根据当前位置,加载指定的建筑室内图,支持分层显示

参数说明:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | 参数 Properties
|
方法
closeIndoor()
关闭分层室内图
convertFloorString(floorString) → {number}
将楼层字符串转换为对应的数字
参数说明:
Name | Type | Description |
---|---|---|
floorString |
string | 楼层字符串,例如 'B1', 'B2', 'F1', 'F2' |
Returns:
转换后的楼层数字,例如 -1, -2, 1, 2
- Type
- number
convertFloorStringToArray(floorString) → {Array.<number>}
将楼层字符串转换为数组
参数说明:
Name | Type | Description |
---|---|---|
floorString |
string | 楼层字符串,例如 'B4|B3|B2|B1' |
Returns:
转换后的楼层数组,例如 [-4, -3, -2, -1]
- Type
- Array.<number>
(async) getIndoorDataByCenter(center, range) → {Array.<Object>}
获取当前区域拥有室内图的模型数据,需要当前视口的经纬度坐标,可通过监听cameraChange事件来获取
参数说明:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
center |
object | 中心点经纬度 Properties
|
|||||||||
range |
number | 范围,单位:米(默认 500 米) |
Returns:
拥有室内数据的模型列表,包含了{lat,lng,mpoi,floor,name}字段
- Type
- Array.<Object>
hideBuildings(numbers)
隐藏数组中的所有楼层
参数说明:
Name | Type | Description |
---|---|---|
numbers |
Array | 楼层,[-1, 1] |
openIndoor(params)
开启指定建筑的指定层
参数说明:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | 参数 Properties
|
showBuildings(numbers)
显示数组中的所有楼层
参数说明:
Name | Type | Description |
---|---|---|
numbers |
Array | 楼层,[-1, 1] |