cesium可视化空间数据2
圆柱圆锥体
- <!DOCTYPE html>
- <html>
- <head>
- <!-- Use correct character set. -->
- <meta charset="utf-8">
- <!-- Tell IE to use the latest, best version. -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
- <title>Hello World!</title>
- <script src="../Cesium/Build/Cesium/Cesium.js"></script>
- <style>
- @import url(../Cesium/Build/Cesium/Widgets/widgets.css);
- html, body, #cesiumContainer {
- width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
- }
- </style>
- </head>
- <body>
- <div id="cesiumContainer"></div>
- <script>
- var viewer = new Cesium.Viewer('cesiumContainer');
- var greenCylinder = viewer.entities.add({//Cylinder圆柱体
- name : 'Green cylinder with black outline',
- position: Cesium.Cartesian3.fromDegrees(-100.0, 40.0, 200000.0),
- cylinder : {
- length : 400000.0,
- topRadius : 200000.0,//圆柱体的顶部半径。
- bottomRadius : 200000.0,// 圆柱体底部的半径。
- material : Cesium.Color.GREEN.withAlpha(0.5),//绿色半透明
- outline : true,//轮廓
- outlineColor : Cesium.Color.DARK_GREEN//轮廓颜色深绿色
- }
- });
- var redCone = viewer.entities.add({//红色圆锥体
- name : 'Red cone',
- position: Cesium.Cartesian3.fromDegrees(-105.0, 40.0, 200000.0),
- cylinder : {
- length : 400000.0,
- topRadius : 0.0,
- bottomRadius : 200000.0,
- material : Cesium.Color.RED
- }
- });
- viewer.zoomTo(viewer.entities);
- </script>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <!-- Use correct character set. -->
- <meta charset="utf-8">
- <!-- Tell IE to use the latest, best version. -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
- <title>Hello World!</title>
- <script src="../Cesium/Build/Cesium/Cesium.js"></script>
- <style>
- @import url(../Cesium/Build/Cesium/Widgets/widgets.css);
- html, body, #cesiumContainer {
- width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
- }
- </style>
- </head>
- <body>
- <div id="cesiumContainer"></div>
- <script>
- var viewer = new Cesium.Viewer('cesiumContainer');
- var redPolygon = viewer.entities.add({//红色多边形
- name : 'Red polygon on surface',
- polygon : {
- hierarchy : Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0,
- -115.0, 32.0,
- -107.0, 33.0,
- -102.0, 31.0,
- -102.0, 35.0]),//hierarchy多边形层次
- material : Cesium.Color.RED
- }
- });
- var greenPolygon = viewer.entities.add({//绿色多边形
- name : 'Green extruded polygon',
- polygon : {
- hierarchy : Cesium.Cartesian3.fromDegreesArray([-108.0, 42.0,
- -100.0, 42.0,
- -104.0, 40.0]),
- extrudedHeight: 500000.0,//多边形的挤出面和椭圆面之间的距离(以米为单位)
- material : Cesium.Color.GREEN,
- closeTop : false,
- closeBottom : false
- }
- });
- var orangePolygon = viewer.entities.add({//橙色多边形
- name : 'Orange polygon with per-position heights and outline',
- polygon : {
- hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,
- -100.0, 25.0, 100000,
- -100.0, 30.0, 100000,
- -108.0, 30.0, 300000]),
- extrudedHeight: 0,//多边形的挤出面和椭圆面之间的距离(以米为单位)。
- perPositionHeight : true,//对每个位置使用options.positions的height,而不使用options.height来确定高度
- material : Cesium.Color.ORANGE.withAlpha(0.5),//橘色半透明
- outline : true,
- outlineColor : Cesium.Color.BLACK//黑色轮廓线
- }
- });
- var bluePolygon = viewer.entities.add({//蓝色多边形
- name : 'Blue polygon with holes and outline',
- polygon : {
- hierarchy : {
- positions : Cesium.Cartesian3.fromDegreesArray([-99.0, 30.0,
- -85.0, 30.0,
- -85.0, 40.0,
- -99.0, 40.0]),
- holes : [{
- positions : Cesium.Cartesian3.fromDegreesArray([
- -97.0, 31.0,
- -97.0, 39.0,
- -87.0, 39.0,
- -87.0, 31.0
- ]),
- holes : [{
- positions : Cesium.Cartesian3.fromDegreesArray([
- -95.0, 33.0,
- -89.0, 33.0,
- -89.0, 37.0,
- -95.0, 37.0
- ]),
- holes : [{
- positions : Cesium.Cartesian3.fromDegreesArray([
- -93.0, 34.0,
- -91.0, 34.0,
- -91.0, 36.0,
- -93.0, 36.0
- ])
- }]
- }]
- }]
- },
- material : Cesium.Color.BLUE.withAlpha(0.5),
- outline : true,
- outlineColor : Cesium.Color.BLACK
- }
- });
- viewer.zoomTo(viewer.entities);
- </script>
- </body>
- </html>
- <!DOCTYPE html>
- <html>
- <head>
- <!-- Use correct character set. -->
- <meta charset="utf-8">
- <!-- Tell IE to use the latest, best version. -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
- <title>Hello World!</title>
- <script src="../Cesium/Build/Cesium/Cesium.js"></script>
- <style>
- @import url(../Cesium/Build/Cesium/Widgets/widgets.css);
- html, body, #cesiumContainer {
- width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
- }
- </style>
- </head>
- <body>
- <div id="cesiumContainer"></div>
- <script>
- var viewer = new Cesium.Viewer('cesiumContainer');
- var redLine = viewer.entities.add({
- name : 'Red line on the surface',
- polyline : {
- positions : Cesium.Cartesian3.fromDegreesArray([-75, 35,
- -125, 35]),
- width : 5,//多段线的宽度(以像素为单位)。
- material : Cesium.Color.RED
- }
- });
- var glowingLine = viewer.entities.add({
- name : 'Glowing blue line on the surface',
- polyline : {
- positions : Cesium.Cartesian3.fromDegreesArray([-75, 37,
- -125, 37]),
- width : 10,
- material : new Cesium.PolylineGlowMaterialProperty({
- glowPower : 0.2,//发光强度的属性,以总线宽度的百分比表示。
- color : Cesium.Color.BLUE
- })
- }
- });
- var orangeOutlined = viewer.entities.add({
- name : 'Orange line with black outline at height and following the surface',
- polyline : {
- positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 39, 250000,
- -125, 39, 250000]),
- width : 5,
- material : new Cesium.PolylineOutlineMaterialProperty({
- color : Cesium.Color.ORANGE,
- outlineWidth : 2,
- outlineColor : Cesium.Color.BLACK
- })
- }
- });
- var purpleArrow = viewer.entities.add({
- name : 'Purple straight arrow at height',
- polyline : {
- positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 43, 500000,
- -125, 43, 500000]),
- width : 10,
- followSurface : false,
- material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.PURPLE)
- }
- });
- viewer.zoomTo(viewer.entities);
- </script>
- </body>
- </html>
- </script>
- </body>
- </html>
cesium可视化空间数据2的更多相关文章
- cesium可视化空间数据1
---恢复内容开始--- 1.多边形 我们要从经度和纬度列表中为美国怀俄明州添加一个多边形.(怀俄明被选中是因为它是一个简单的多边形.)我们可以复制并粘贴以下代码到Sandcastle中: < ...
- 用Cesium可视化地下设施、矿山和地质层
Cesium中文网:http://cesiumcn.org/ | 国内快速访问:http://cesium.coinidea.com/ 本月的CesiumJS 1.70发布引入的一项关键改进是地下数据 ...
- Cesium数据可视化-仓储调度系统可视化部分(附github源码)
Cesium数据可视化-仓储调度系统可视化部分 目的 仓储调度系统需要一个可视化展示物资运输实况的界面,需要配合GPS设备发送的位置信息,实时绘制物资运输情况和仓储仓库.因此,使用Cesium可视化该 ...
- Cesium参考资源
Reference resources cesium官网 cesium 下载 cesium官方文档 APIs cesium-workshop github cesium 官方示例 cesium git ...
- 手把手教你学习R语言
本文为带大家了解R语言以及分段式的步骤教程! 人们学习R语言时普遍存在缺乏系统学习方法的问题.学习者不知道从哪开始,如何进行,选择什么学习资源.虽然网络上有许多不错的免费学习资源,然而它们多过了头,反 ...
- 剖析虚幻渲染体系(15)- XR专题
目录 15.1 本篇概述 15.1.1 本篇内容 15.1.2 XR概念 15.1.2.1 VR 15.1.2.2 AR 15.1.2.3 MR 15.1.2.4 XR 15.1.3 XR综述 15. ...
- Cesium中级教程1 - 空间数据可视化(一)
Cesium中文网:http://cesiumcn.org/ | 国内快速访问:http://cesium.coinidea.com/ 本教程将教读者如何使用Cesium的实体(Entity)API绘 ...
- Cesium中级教程4 - 空间数据可视化(二)
Cesium中文网:http://cesiumcn.org/ | 国内快速访问:http://cesium.coinidea.com/ Viewer中的Entity功能 让我们看看Viewer为操作e ...
- Ceisum官方教程3 -- 空间数据可视化
原文地址:https://cesiumjs.org/tutorials/Visualizing-Spatial-Data/ 这篇教程教你如何使用Cesium的Entity API去绘制空间数据,如点, ...
随机推荐
- Linux下NDK的配置
vim ~/.bashrc 在文件末尾添加如图两行代码 写下来方便复制export NDKROOT=/usr/ndk/android-ndk-r12bexport PATH=$NDKROOT:$PAT ...
- 经典 makefile 教程
makefile很重要 什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和professional的程序 ...
- python2安装pymongo
wget --no-check-certificate https://pypi.python.org/packages/source/p/pymongo/pymongo-2.6.3.tar.gz#m ...
- Windows2012R2版本区别
From:https://zh.wikipedia.org/wiki/Windows_Server_2012 Windows Server 2012有4种版本:Foundation, Essentia ...
- 【Java】高并发同步Volatile的使用
引言: 在多线程并发编程中synchronized和Volatile都扮演着重要的角色,Volatile是轻量级的Synchronized,它在多处理器开发中保证了共享变量的“可见性”. 可见性的意思 ...
- java 多线程9 : synchronized锁机制 之 代码块锁
synchronized同步代码块 用关键字synchronized声明方法在某些情况下是有弊端的,比如A线程调用同步方法执行一个较长时间的任务,那么B线程必须等待比较长的时间.这种情况下可以尝试使用 ...
- 关于HTML、XHTML、CSS、XML的区别
1.HTML(Hyper Text Mark-up Language) HTML(Hyper Text Mark-up Language)即超文本标记语言或超文本链接标示语言,是为“网页创建和其他可在 ...
- c++之——抽象基类
在一个虚函数的声明语句的分号前加上 =0:就可以将一个虚函数变成纯虚函数,其中,=0只能出现在类内部的虚函数声明语句处.纯虚函数只用声明,而不用定义,其存在就是为了提供接口,含有纯虚函数的类是抽象基类 ...
- [转]Windows Server 2008 对 CPU 及 RAM 的支持规格
Windows Server 2008 对 CPU 的支援: 在看到下表时,请注意其数字所指的是:主板上的实体 CPU的个数,也就是几个 Sockets 举例来说,机器上安装 2 个 4 核心的 CP ...
- POJ 3253-Fence Repair(堆)
Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27055 Accepted: 8800 Des ...