HERE地图材料附带不同的地图视图和可能的叠加层,如“交通状况”,“公共交通”和“突发事件”。 我根本不想提供这三种观点。 不幸的是,我只能通过以下代码停用它们:
//disable traffic information var control = HEREMap.ui.getControl('mapsettings'); control.getChildren()[1].m[3].setDisabled(true); control.getChildren()[1].m[2].setDisabled(true); control.getChildren()[1].m[1].setDisabled(true);然而,这给我留下了灰色的,不可忽视的选项,如“交通状况”,“公共交通”和“事故”。 有没有办法使用JavaScript API显示它们?
在此先感谢DG7团队
HERE Map material comes with different map views and possible overlays like 'Traffic conditions', 'Public transport' and 'Incidents'. I do not want to offer these three views at all. Unfortunately, I was only able to deactivate them by the following code:
//disable traffic information var control = HEREMap.ui.getControl('mapsettings'); control.getChildren()[1].m[3].setDisabled(true); control.getChildren()[1].m[2].setDisabled(true); control.getChildren()[1].m[1].setDisabled(true);However, this leaves me with gray, unclickable options for like 'Traffic conditions', 'Public transport' and 'Incidents'. Is there a way to show them not at all using the JavaScript API?
Thanks in advance, Team DG7
最满意答案
不漂亮,但它的工作原理。 按照相同的方法删除hr。
$(".H_btn:contains('Traffic conditions')").hide(); $(".H_btn:contains('Public transport')").hide(); $(".H_btn:contains('Show traffic incidents')").hide();Not pretty but it works. Follow the same approach to remove the hr.
$(".H_btn:contains('Traffic conditions')").hide(); $(".H_btn:contains('Public transport')").hide(); $(".H_btn:contains('Show traffic incidents')").hide();更多推荐
发布评论