The Property System.html

本文介绍如何使用Cesium在Web环境中创建并渲染地形多边形,通过具体的代码示例展示了如何定义和显示Wyoming州的地形轮廓,同时探讨了Cesium中属性系统的应用,包括常量属性的使用和时间相关的属性值获取。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="Use Viewer to start building new applications or easily embed Cesium into existing applications.">
    <meta name="cesium-sandcastle-labels" content="Beginner, Showcases">
    <title>The Property System</title>
    <script type="text/javascript" src="../Sandcastle-header.js"></script>
    <script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
    <script type="text/javascript">
    require.config({
        baseUrl : '../../../Source',
        waitSeconds : 60
    });
    </script>
</head>

<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
    <style>
        @import url(../templates/bucket.css);
    </style>
    <div id="cesiumContainer" class="fullSize"></div>
    <div id="loadingOverlay"><h1>Loading...</h1></div>
    <div id="toolbar"></div>
    <script id="cesium_sandcastle_script">
    function startup(Cesium) {
        'use strict';
        //Sandcastle_Begin
        let viewer = new Cesium.Viewer('cesiumContainer');
        let wyoming = viewer.entities.add({
            name : 'Wyoming',
            polygon : {
                hierarchy : Cesium.Cartesian3.fromDegreesArray([
                    -109.080842,45.002073,
                    -105.91517,45.002073,
                    -104.058488,44.996596,
                    -104.053011,43.002989,
                    -104.053011,41.003906,
                    -105.728954,40.998429,
                    -107.919731,41.003906,
                    -109.04798,40.998429,
                    -111.047063,40.998429,
                    -111.047063,42.000709,
                    -111.047063,44.476286,
                    -111.05254,45.002073]),
                height : 0,
                material : Cesium.Color.RED.withAlpha(0.5),
                outline : true,
                outlineColor : Cesium.Color.BLACK
            }
        });

        viewer.zoomTo(wyoming);

        console.log(wyoming.polygon.outline);
        // ConstantProperty {_value: true, _hasClone: false, _hasEquals: false, _definitionChanged: Event}
        console.log(typeof wyoming.polygon.outline);
        // object
        // 从技术上讲,如果我们确定正在查询的属性是常量属性,则可以避免传递时间,但是始终指定它是一个很好的实践。
        // 为了从多边形中检索Outline属性,我们将调用下面的代码,其中时间是当前场景时间。
        console.log(wyoming.polygon.outline.getValue(viewer.clock.currentTime));  // true
        console.log(wyoming.polygon.outline.getValue());  // true

        // Sandcastle_End
        Sandcastle.finishedLoading();
    }

    if (typeof Cesium !== 'undefined') {
        startup(Cesium);
    }
    else if (typeof require === 'function') {
        require(['Cesium'], startup);
    }
    </script>
</body>
</html>
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <configuration> <!-- The following properties are set for running HBase as a single process on a developer workstation. With this configuration, HBase is running in "stand-alone" mode and without a distributed file system. In this mode, and without further configuration, HBase and ZooKeeper data are stored on the local filesystem, in a path under the value configured for `hbase.tmp.dir`. This value is overridden from its default value of `/tmp` because many systems clean `/tmp` on a regular basis. Instead, it points to a path within this HBase installation directory. Running against the `LocalFileSystem`, as opposed to a distributed filesystem, runs the risk of data integrity issues and data loss. Normally HBase will refuse to run in such an environment. Setting `hbase.unsafe.stream.capability.enforce` to `false` overrides this behavior, permitting operation. This configuration is for the developer workstation only and __should not be used in production!__ See also https://hbase.apache.org/book.html#standalone_dist --> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.tmp.dir</name> <value>/home/hadoop/hbase_dir/tmp</value> </property> <property> <name>hbase.unsafe.stream.capability.enforce</name> <value>false</value> </property> <property> <name>hbase.rootdir</name> <value>hdfs://hadoop141:9000/hbase</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <property> <name>zookeeper.session.timeout</name> <value>120000</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>hadoop141,hadoop142,hadoop143</value> </property> <property> <name>hbase.wal.provider</name> <value>filesystem</value> </property> <property> <name>hbase.root.logger</name> <value>ERROR,console</value> </property> </configuration> 这是我的hbase-site.xml内容,帮我看看哪里有误?
最新发布
08-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值