[置顶] cesium学习记录(二)- 可视化空间数据Viewer 中的Entity
2017-12-25 09:59
555 查看
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。
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。
相关文章推荐
- [置顶] cesium学习记录(-)- 可视化空间数据Entity入门基础
- cesiumjs学习笔记之二——空间数据可视化
- cesium可视化空间数据2
- Cesium 概述 (二) 空间数据可视化
- Cesium 学习记录(2) 初始化Viewer
- cesium可视化空间数据1
- 2014年4月1日MySQL学习记录--mysql数据类型及占用空间&&修改表的语法
- 简单统计SQLSERVER用户数据表大小(包括记录总数和空间占用情况)
- codeSmish Entity Object 存储数据时数据残留问题记录
- ORACLE空间管理实验1:探索LMT表空间管理下数据文件头的结构及位图中区的记录方式
- ROS学习笔记(三)- 分布式节点与laser数据可视化
- jvm学习记录--02 jvm运行时数据区域(内存区域)
- python学习记录 — (1) 变量及数据类型
- C#学习记录二:高级数据存储方式
- ElasticSearch学习问题记录——nested查询不到数据
- WebService学习记录----客户端数据发送
- 我记录综合系统学习研究之用户管理四(用户空间)
- Elasticsearch中的document数据格式,简单的集群管理,商品的索引的CRUD操作(学习资料记录)
- android学习记录2(日志、上下文、android下数据存储、xml基础)
- discuz学习记录:前面的数据用EasyUI DataGrid显示,实现了服务器端分页