创建 LOC 地理位置消息
接口
objc
- (BIMLocationMessage *)createLocationMessageWithLongitude:(double)longitude
latitude:(double)latitude
address:(NSString *)address
name:(NSString *)name;1
2
3
4
2
3
4
| 参数 | 说明 |
|---|---|
longitude | WGS-84 经度 |
latitude | WGS-84 纬度 |
address | 详细地址 |
name | 地点名称 |
swift
let message = BIMManager.sharedInstance().createLocationMessage(
withLongitude: coordinate.longitude,
latitude: coordinate.latitude,
address: "深圳市南山区……",
name: "会议中心"
)1
2
3
4
5
6
2
3
4
5
6
创建后使用统一的 sendMessage 接口发送。收到消息时将 BIMMessage 判断并转换为 BIMLocationMessage,读取 longitude、latitude、address 和 name。
SDK 只负责消息结构,不申请定位权限、不展示地图,也不执行坐标系转换。接入方应通过 Core Location/MapKit 获取和展示位置,并确保传入坐标使用同一坐标系。
