cesium学习记录(二)- 可视化空间数据Viewer 中的Entity

来源:互联网 发布:2017年网络暴力案例 编辑:程序博客网 时间:2024/04/29 22:19

Unless we specifically disable it, clicking on an entity in the Viewer will show the SelectionIndicator widget at the Entity’s location as well as bring up the InfoBox widget to provide more information. Going back to our original example, we only supplied the wyoming entity with a name, which determines the title of the InfoBox, but we can also provide additional data in HTML via the Entity.description property. Let’s add the below block of code to the end of the first example.

除非我们特别禁用它,否则在查看器中单击一个实体将显示该实体位置的selectionIndicator小部件,并打开InfoBox小部件已展示提供更多信息。回到我们最初的示例,我们只提供了wyoing实体的名称,它决定了InfoBox的名称,但是我们也可以通过entity.description属性提供HTML中的额外数据。让我们将下面的代码块添加到第一个示例的末尾。



设置实体描述允许在infoBox中显示的HTML 格式的信息

Many applications will retrieve descriptions from the server rather than using a hard coded string, but either approach is valid.


By default, all HTML shown in the InfoBox is sandboxed. This prevents external data sources from injecting malicious code into a Cesium application. If you want to be able to run JavaScript or browser plug-ins inside of a description, you can access the iframe used for sandboxing via the viewer.infoBox.frame property. See this article for more information on controlling iframe sandboxing.

许多应用程序将从服务器检索描述,而不是使用硬编码的字符串,但是这两种方法都是有效的。
默认情况下,在InfoBox中显示的所有HTML都是沙盒化的。这可以防止外部数据源向Cesium应用程序中注入恶意代码。如果您希望能够在描述中运行JavaScript或浏览器插件,那么您可以通过viewer.infobox.frame属性访问用于沙箱的iframe。

阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 制冷设备价格 滑雪大冒险冰池在哪 制冰盒 空调制冷剂回收 r123制冷剂 冰箱制冷剂泄漏 冰箱制冷剂怎么加 空调怎么收制冷剂 中央空调制冷剂 空调制冷剂有几种 r507制冷剂 混合制冷剂 r717制冷剂 134a制冷剂 制冷剂生产厂家 制冷剂价格 制冷剂r134a 汽车制冷剂 r401a制冷剂 常用制冷剂 碳氢制冷剂 r410a制冷剂加注方法 r11制冷剂 r22制冷剂价格走势 404a制冷剂 冰箱制冷剂价格 r406a制冷剂代换 410制冷剂 290制冷剂 制冷剂是什么 r22是什么制冷剂 制冷剂型号 制冷剂回收加注机 制冷剂r123 r404a制冷剂代换 制冷剂f22 螺杆制冷剂 404a制冷剂工作压力 制冷剂检测 制冷剂成分 冰箱制冷剂是什么