Cesium.js学习第二天(立方体)
var viewer = new Cesium.Viewer('cs');
viewer.entities.add({//图标
position: Cesium.Cartesian3.fromDegrees(jd,wd,gd),
billboard : {
scaleByDistance : new Cesium.NearFarScalar(1.5e1, 1.0, 1.5e2, 0.5),
image :imgs
},
// var citizensBankPark = viewer.entities.add( {
// position : Cesium.Cartesian3.fromDegrees( jd,wd,gd),
// point : { //点
// pixelSize : 5,
// color : Cesium.Color.RED,
// outlineColor : Cesium.Color.WHITE,
// outlineWidth : 2
// },
// label : { //文字标签
// text : '选择坐标',
// font : '14pt monospace',
// style : Cesium.LabelStyle.FILL,
// outlineWidth : 2,
//
// }
var entity = viewer.entities.add({ //矩形
// rectangle : {
// coordinates : Cesium.Rectangle.fromDegrees(hd1,hd2,hd3,hd4),
// material:'/img/yunnan.jpg'
// }
// viewer.entities.add({//正方形
// position:Cesium.Cartesian3.fromDegrees(-9300,1000,1400),
// box:{
// dimensions:new Cesium.Cartesian3(800000.0, 800000.0,800000.0),
// material:'/img/cesium.png'
// }
// })
// viewer.entities.add({//球体
// position: Cesium.Cartesian3.fromDegrees(-300,100,400),
// ellipsoid:{
// radii :new Cesium.Cartesian3(800000.0, 800000.0,800000.0),
// material:'/img/cesium.png'
// }
// })
// viewer.entities.add({//圆柱
// position: Cesium.Cartesian3.fromDegrees(-300,100,400),
// cylinder :{
// length : 400000.0,
// topRadius : 200000.0,
// bottomRadius : 200000.0,
// material : Cesium.Color.GREEN.withAlpha(0.5),
// outline : true,
// outlineColor : Cesium.Color.DARK_GREEN//
// }
// })
// viewer.entities.add({//圆锥
// position: Cesium.Cartesian3.fromDegrees(116.423241,43.920026, 200000.0),
// cylinder : {
// length : 400000.0,
// topRadius : 0.0,
// bottomRadius : 200000.0,
// material : Cesium.Color.RED
// }
// })
viewer.entities.add({
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray([
-197.0, 231.0,
-97.0, 339.0,
-87.0, 359.0,
-8237.0, 31.0]),
height : 500000,//多边形高度
material : Cesium.Color.RED.withAlpha(1),//红色不透明
outline : true,
outlineColor : Cesium.Color.ORANGE//橘色轮廓线
}
})
viewer.entities.add({
polyline : {
positions : Cesium.Cartesian3.fromDegreesArray([-75, 35,
-125, 35]),
width : 5,
material : Cesium.Color.RED
}
});
viewer.entities.add({
polyline : {
positions : Cesium.Cartesian3.fromDegreesArray([-75, 37,
-125, 37]),
width : 10,
material : new Cesium.PolylineGlowMaterialProperty({
glowPower : 0.2,//发光强度的属性,以总线宽度的百分比表示。
color : Cesium.Color.BLUE
})
}
});
viewer.entities.add({
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
})
}
});
viewer.entities.add({
polyline : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 43, 500000,
-125, 43, 500000]),
width : 10,
followSurface : false,
material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.PURPLE)
}
});
viewer.entities.add({//蓝色多边形
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.entities.add({//绿色多边形
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
}
});
Cesium.js学习第二天(立方体)的更多相关文章
- cesium js学习一加载三维模型【转】
http://blog.csdn.net/tangyajun_168/article/details/50936698 最近项目中用到室外三维模型与室内三维地图交互,室外三维模型的加载我们采用了ces ...
- JS学习第二课
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Ext JS学习第二天 我们所熟悉的javascript(一)
此文用来记录学习笔记: •ExtJS是一个强大的javascript框架,如果想真正的掌握ExtJS,那么我们必须要对javascript有一定的认识,所以很有必要静下心来,抱着一本javascrip ...
- Cesium.js学习第三天(模型展示)
var viewer = new Cesium.Viewer('cs'); viewer.scene.primitives.add(Cesium.Model.fromGltf({ url : '/Ce ...
- Cesium.js学习第一天(设置材质)
var viewer = new Cesium.Viewer('cs'); var entity = viewer.entities.add({ position: Cesium.Cartesian3 ...
- js学习第二篇简单语法
字符串(String)字面量 可以使用单引号或双引号 数组(Array)字面量 定义一个数组: [40, 100, 1, 5, 25, 10] 对象(Object)字面量 定义一个对象: {first ...
- JS学习第二天
数组: var arr1=[2,5,6]; 定义时直接给数组元素赋值 var arr2=[]; 定义一个空数组 var arr3=new Array(); 定义一个空数组并通过索引来 ...
- 【Knockout.js 学习体验之旅】(2)花式捆绑
本文是[Knockout.js 学习体验之旅]系列文章的第2篇,所有demo均基于目前knockout.js的最新版本(3.4.0).小茄才识有限,文中若有不当之处,还望大家指出. 目录: [Knoc ...
- 前端学习 第二弹: JavaScript中的一些函数与对象(1)
前端学习 第二弹: JavaScript中的一些函数与对象(1) 1.apply与call函数 每个函数都包含两个非继承而来的方法:apply()和call(). 他们的用途相同,都是在特定的作用域中 ...
随机推荐
- Permanent data region free space insufficient to allocate 64792 bytes of memory
TT0802: Database permanent space exhaustedTT6220: Permanent data region free space insufficient to a ...
- 【VirtualBox】快照
一.快照备份 虚拟机系统快照下来,以后就可以恢复到快照之前的系统 右上角->虚拟电脑工具->快照
- 深入理解JavaScript系列(11):执行上下文(Execution Contexts)
简介 从本章开始,我将陆续(翻译.转载.整理)http://dmitrysoshnikov.com/网站关于ECMAScript标标准理解的好文. 本章我们要讲解的是ECMAScript标准里的执行上 ...
- FreeSwitch无法启动,提示进程pid锁定的解决方法
来源:https://stackoverflow.com/questions/12817232/how-do-i-call-a-local-softphone-on-freeswitch error ...
- 深入理解 Java 内存模型(转载)
摘要: 原创出处 http://www.54tianzhisheng.cn/2018/02/28/Java-Memory-Model/ 「zhisheng」欢迎转载,保留摘要,谢谢! 0. 前提 &l ...
- python发送邮件(带附件)
python通过stmp发送qq邮件,带附件 import smtplib from email.mime.multipart import MIMEMultipart from email.mime ...
- js for in 遍历对象与数组
遍历对象 let obj = { q:'9', w:'5', e:'2', t:'7', c:'3' } //for in 遍历对象 key为对象的属性名称,遍历属性值时用[]操作符访问 //通过[] ...
- C++基础--指针,&的用法
#include "stdafx.h" #include <stdio.h> #include <string.h> int main() { ] = {, ...
- Elipse plugin or Bundle & OSGI
Develop and register service, lookup and use service! Android Design on service's publish-find-bind ...
- Java使用POI操作Excel文件
1.简介 Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程序对Microsoft Office格式文件读和写的功能. 2.依赖的jar包 <!-- ex ...