<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ## 繪制點線面 ### 方案一:通過entity來添加 ### 先來看一個添加立方體的例子 ``` var viewer = new Cesium.Viewer('cesiumContainer'); var redBox = viewer.entities.add({ name : 'Red box with black outline', position: Cesium.Cartesian3.fromDegrees(-107.0, 40.0, 300000.0), box : { dimensions : new Cesium.Cartesian3(400000.0, 300000.0, 500000.0), material : Cesium.Color.RED.withAlpha(0.5), outline : true, outlineColor : Cesium.Color.BLACK } }); viewer.zoomTo(viewer.entities); ``` 效果如圖: ![](https://box.kancloud.cn/cb0f7476457c6ab82d4f1501c973c45b_352x319.jpg) ### 方案二:通過CZML添加 通過CZML也可以添加幾何形狀,而且CZML還可以描述動畫(現在先有個印象,動畫以后介紹) 先來看看官網上的說明,CZML是一種JSON格式的字符串,用于描述與時間有關的動畫場景,CZML包含點、線、地標、模型、和其他的一些圖形元素,并指明了這些元素如何隨時間而變化。某種程度上說, Cesium 和 CZML的關系就像 Google Earth 和 KML。 ``` var czml = [{ "id" : "document", "name" : "box", "version" : "1.0" },{ "id" : "shape2", "name" : "Red box with black outline", "position" : { "cartographicDegrees" : [-107.0, 40.0, 300000.0] }, "box" : { "dimensions" : { "cartesian": [400000.0, 300000.0, 500000.0] }, "material" : { "solidColor" : { "color" : { "rgba" : [255, 0, 0, 128] } } }, "outline" : true, "outlineColor" : { "rgba" : [0, 0, 0, 255] } } }]; var viewer = new Cesium.Viewer('cesiumContainer'); var dataSourcePromise = Cesium.CzmlDataSource.load(czml); viewer.dataSources.add(dataSourcePromise); viewer.zoomTo(dataSourcePromise); ``` ### 形狀相關描述 >下表來自于官方網站,但是連接改為本地鏈接了 |&nbsp;|&nbsp;|&nbsp;| |---|---|---| |Point|![point](https://box.kancloud.cn/37a2f9f33aef25a9c663ab3c5d93b753_80x80.png)|entity.point - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/PointGraphics.html) |Boxes|![Box](https://box.kancloud.cn/e1ee4c17af62556eea6f05003238dd11_80x80.png)|entity.box - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Box.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/BoxGraphics.html) |Circles and Ellipses|![Ellipse](https://box.kancloud.cn/d23a64aae7b087a9a2fe0c8bb95eeb7d_80x80.png)|entity.ellipse - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Circles%20and%20Ellipses.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/EllipseGraphics.html) |Corridor|![Corridor](https://box.kancloud.cn/5211d4b0e624b89d7be7316b75d5321c_80x80.png)|entity.corridor - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Corridor.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/CorridorGraphics.html) |Cylinder and Cones|![Cylinder](https://box.kancloud.cn/3bee256207ed3a2d0548929ce69e7d48_80x80.png)|entity.cylinder - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Cylinders%20and%20Cones.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/CyilnderGraphics.html) |Polygons|![Polygon](https://box.kancloud.cn/6ffb449bd12c69dcf3f51b65c66cf4a4_80x80.png)|entity.polygon - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Polygon.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/PolygonGraphics.html) [Reference Build/Documentation] |Polylines|![Polyline](https://box.kancloud.cn/ee2a7e46a321b449599c5bed5bdb2a6b_80x80.png)|entity.polyline - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Polyline.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/PolylineGraphics.html) |Polyline Volumes|![Volume](https://box.kancloud.cn/ac9d50e3b9b60c2284510f9e587893af_80x80.png)|entity.polylineVolume - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Polyline%20Volume.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/PolylineVolume.html) |Rectangles|![Rectangle](https://box.kancloud.cn/1afcabfe8fa54d557636dc10f6d35eae_80x80.png)|entity.rectangle - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Rectangle.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/Rectangle.html) |Spheres and Ellipsoids|![Ellipsoid](https://box.kancloud.cn/43543d666218de7d9e68c58b3f0d88e5_80x80.png)|entity.ellipsoid - [Code example](http://localhost:8080/Apps/Sandcastle/index.html?src=Spheres%20and%20Ellipsoids.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/EllipsoidGraphics.html) |Walls|![Wall](https://box.kancloud.cn/b6fa2e455c2e39571cce13d24149b60a_80x80.png)|entity.wall - (http://localhost:8080/Apps/Sandcastle/index.html?src=Wall.html) - [Reference Build/Documentation](http://localhost:8080/Build/Documentation/WallGraphics.html) **Cesium學習交流群:593764057(滿),476893082**
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看