从 Beacons 获取位置信息时,如何使用此处 api 设置室内位置

How to set the Indoorlocation with the here api when obtaining Locationinformation from Beacons

我想通过从信标获取位置,在 Here-sdk 上实现到 Indoor-Spaces 的室内路由。当我想用 RoutingController 创建一条路线时,我正在苦苦挣扎。这个 Controller 需要一个 Location 作为起点,BaseType 是 BaseLocation。 但是没有 BaseLocation 的子项允许我根据从信标获得的值自行设置建筑物内的位置和级别。当我查看 LevelLocation 时,我需要一个没有 public 构造函数的 Level-Object。 从我的 Beacons 中,我收到以地理坐标形式表示的室内位置和以整数形式表示的建筑物内部级别。如何使用我的信标中的信息创建 LevelLocation?或者还有其他我可以使用的对象吗?

我找到了解决方案。您可以从 VenueController.

中获取级别
private LevelLocation createLevelLocationWithBeaconData(int floor, double latitude, double longitude) {

     venueController = mapFragment.getVenueController(this.venue);
     GeoCoordinate geoCoordinate = new GeoCoordinate(latitude,longitude);

     Level level = venueController.getVenue().getLevels().get(floor);
     return new LevelLocation(level, geoCoordinate ,this.venue);
    }