English中文

PerformanceWatchdog

new Cesium.PerformanceWatchdog(options)

监视应用程序的性能并在检测到性能不佳时显示一条消息。 Monitors performance of the application and displays a message if poor performance is detected.
名称 Name 类型 Type 说明 Description
options object 可选 optional 具有以下属性的对象: Object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
container Element | string 将包含小部件的 DOM 元素或 ID。 The DOM element or ID that will contain the widget.
scene Scene The Scene 用于监控性能。 for which to monitor performance.
lowFrameRateMessage string 'This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.' 可选 optional 检测到低帧速率时显示的消息。该消息以 HTML 形式解释,因此请确保它来自受信任的来源,以便您的应用程序不易受到跨站点脚本攻击。 The message to display when a low frame rate is detected. The message is interpeted as HTML, so make sure it comes from a trusted source so that your application is not vulnerable to cross-site scripting attacks.

成员 Members

获取父容器。 Gets the parent container.
获取视图模型。 Gets the view model.

方法 Methods

销毁小部件。如果从布局中永久删除小部件,则应调用。 Destroys the widget. Should be called if permanently removing the widget from layout.
返回: Returns:
如果对象已被销毁,则为 true,否则为 false。 true if the object has been destroyed, false otherwise.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.