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学习第二天(立方体)的更多相关文章

  1. cesium js学习一加载三维模型【转】

    http://blog.csdn.net/tangyajun_168/article/details/50936698 最近项目中用到室外三维模型与室内三维地图交互,室外三维模型的加载我们采用了ces ...

  2. JS学习第二课

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. Ext JS学习第二天 我们所熟悉的javascript(一)

    此文用来记录学习笔记: •ExtJS是一个强大的javascript框架,如果想真正的掌握ExtJS,那么我们必须要对javascript有一定的认识,所以很有必要静下心来,抱着一本javascrip ...

  4. Cesium.js学习第三天(模型展示)

    var viewer = new Cesium.Viewer('cs'); viewer.scene.primitives.add(Cesium.Model.fromGltf({ url : '/Ce ...

  5. Cesium.js学习第一天(设置材质)

    var viewer = new Cesium.Viewer('cs'); var entity = viewer.entities.add({ position: Cesium.Cartesian3 ...

  6. js学习第二篇简单语法

    字符串(String)字面量 可以使用单引号或双引号 数组(Array)字面量 定义一个数组: [40, 100, 1, 5, 25, 10] 对象(Object)字面量 定义一个对象: {first ...

  7. JS学习第二天

    数组: var arr1=[2,5,6];    定义时直接给数组元素赋值 var arr2=[];   定义一个空数组 var arr3=new Array();     定义一个空数组并通过索引来 ...

  8. 【Knockout.js 学习体验之旅】(2)花式捆绑

    本文是[Knockout.js 学习体验之旅]系列文章的第2篇,所有demo均基于目前knockout.js的最新版本(3.4.0).小茄才识有限,文中若有不当之处,还望大家指出. 目录: [Knoc ...

  9. 前端学习 第二弹: JavaScript中的一些函数与对象(1)

    前端学习 第二弹: JavaScript中的一些函数与对象(1) 1.apply与call函数 每个函数都包含两个非继承而来的方法:apply()和call(). 他们的用途相同,都是在特定的作用域中 ...

随机推荐

  1. 如何发布一个包到npm && 如何使用自己发布的npm包 && 如何更新发布到npm的package && 如何更新当前项目的包?

    如何发布一个包到npm First 在https://www.npmjs.com注册一个账号. Second 编辑好项目,文件大致如下: 其中,gitignore可以如下: .DS_Store nod ...

  2. The Java serialization algorithm revealed---reference

    Serialization is the process of saving an object's state to a sequence of bytes; deserialization is ...

  3. 使用pygame开发一个弹幕射击游戏(一)

    本文作为开发过程记录用. 目前游戏画面: 下一个添加的功能:敌机可以进行射击. 弹幕类 from pygame.sprite import Sprite from pygame import tran ...

  4. attribute和property的区别

    DOM元素的attribute和property很容易混倄在一起,分不清楚,两者是不同的东西,但是两者又联系紧密.很多新手朋友,也包括以前的我,经常会搞不清楚. attribute翻译成中文术语为“特 ...

  5. scss-null在@mixin传参中的应用

    可以给混合器声明参数,以便灵活的配置相关属性值,看如下scss代码: @mixin antzone-div($color, $font-size) { color:$color; font-size: ...

  6. html跨域获取数据

    a.com下的a.html,需要嵌入b.com下的b.html.这时建一个静态页面c.html将c.html放到a.com服务器中.b.html在嵌入c.html.这样,将参数值传输到c.html中, ...

  7. sql server 数据库代码备份及还原代码

    --备份 BACKUP DATABASE [库名称] TO DISK='E:\qq\ddd.bak' --备份并覆盖 BACKUP DATABASE [库名称] TO DISK='E:\qq\ddd. ...

  8. ant用法

    下载ant包,解压版,解压到某目录后配置环境变量即可,这里不在赘述.配置成功cmd ant-version,显示ant版本即OK.           ant是Apache的跨平台的构建工具,他可以实 ...

  9. 使用 yield生成迭代对象函数

    https://www.cnblogs.com/python-life/articles/4549996.html https://www.liaoxuefeng.com/wiki/001431608 ...

  10. 【Leetcode】【Easy】Pascal's Triangle II

    Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3, ...