Azure Maps 室内模块:无需用户输入即可更改楼层

Azure Maps Indoor Module: Change floor without user input

我一直在使用 Azure 地图室内模块 https://docs.microsoft.com/en-us/azure/azure-maps/tutorial-creator-indoor-maps。您可以允许用户从库中选择一个带有关卡控制元素的关卡,但是我想不出一种方法来预设某个关卡(例如,我想从某个设施开始,而第 2 关卡前 select在地图加载时编辑。)对于设施,有一个 indoorManager.setFacility() 函数允许您 select 一个设施,但我还没有找到该级别的等效项。

要求:我想在没有用户输入的情况下 select Azure Maps 中的一个级别。

似乎还没有任何官方方法可以执行此操作,请注意 Azure Maps Creator 仍处于预览阶段。也就是说,我确实想出了一个 hacky 的方法来解决这个问题(将来可能会崩溃)。

var facilityId = 'FCL13';
var level = 2;

//Set the facility and the levels "ordinal number". The ordinal number appears to be off by 1.
indoorManager.setFacility(facilityId, level - 1);

//Used to trigger the level control to refresh.
map.events.invoke('moveend')