cesium

Cone rotation around apex with Cesium.js

旧城冷巷雨未停 提交于 2021-02-08 04:41:41
问题 I am trying to rotate a cone from its apex, rather than its centre, so that the apex remains in the same position. I've found the example below from the following link: https://groups.google.com/forum/#!topic/cesium-dev/f9ZiSWPMgus But it only shows how to rotate the cone by 90 degrees, if you choose a different value for roll, like 45 or 30 degrees, it gets skewed, and the apex ends up in the wrong place. I know its something to do with the offset, but can't make any progress from there. Is

Cone rotation around apex with Cesium.js

折月煮酒 提交于 2021-02-08 04:41:12
问题 I am trying to rotate a cone from its apex, rather than its centre, so that the apex remains in the same position. I've found the example below from the following link: https://groups.google.com/forum/#!topic/cesium-dev/f9ZiSWPMgus But it only shows how to rotate the cone by 90 degrees, if you choose a different value for roll, like 45 or 30 degrees, it gets skewed, and the apex ends up in the wrong place. I know its something to do with the offset, but can't make any progress from there. Is

Cesium label blurred

落爺英雄遲暮 提交于 2021-02-07 12:23:13
问题 I created a Cesium label, using the following code: var label: Cesium.LabelGraphics = new Cesium.LabelGraphics({ text : lab, verticalOrigin: Cesium.VerticalOrigin.TOP, horizontalOrigin: Cesium.HorizontalOrigin.RIGHT, font: '15px Helvetica', fillColor: Cesium.Color.WHITE, outlineWidth: 2, style: Cesium.LabelStyle.FILL, pixelOffset: new Cesium.Cartesian2(20, 20) }); But it is blurred... I would like to have a clearer label. Is this image you can see inside the red rectangle the real label. In

Cesium: Custom material on a Rectangle Entity

孤街浪徒 提交于 2021-02-07 08:01:33
问题 I am trying to add an Entity whose has several varying properties such as material (alpha, mostly) and rotation. RectangleGraphics has rotation covered, and works when I set the material to represent a texture. viewer.entities.add({ name: 'Site Layer', rectangle: { coordinates: rectangle, material: 'Image.jpg', rotation: Cesium.Math.toRadians(13) } }); However, when I tried to implement transparency by using a custom Material (using https://github.com/AnalyticalGraphicsInc/cesium/issues/2484)

Polyline Intersection With Terrain in Cesium

你离开我真会死。 提交于 2021-02-06 11:53:32
问题 I am using Cesium, and am trying to detect where a polyline intersects with the terrain on the Earth. I have a polyline that begins at some point in the air and is drawn towards the Earth at a certain angle. Right now I am calculating the end point just using a set distance, so I have a start and endPoint. I want to detect where this polyline first hits the Earth's surface and stop drawing it at that point. For example, if there is a tall mountain, I don't want the line to continue on the

Cesium: picking entity and retrieving info of WMS

不问归期 提交于 2020-05-29 07:19:20
问题 I have developed a 3D viewer of buildings. What I'm trying to add now is the selection of the content of a WMS (Web Map Service) below the building entities. Basically, I want to be able to select the building at the position were the user left clicks. The colour of the building should change (which works). And I want to retrieve the information of the Web Map Service at the position were the user clicked. This is what I have coded so far: var pickColor = Cesium.Color.CYAN.withAlpha(0.7); var

Cesium: picking entity and retrieving info of WMS

霸气de小男生 提交于 2020-05-29 07:19:10
问题 I have developed a 3D viewer of buildings. What I'm trying to add now is the selection of the content of a WMS (Web Map Service) below the building entities. Basically, I want to be able to select the building at the position were the user left clicks. The colour of the building should change (which works). And I want to retrieve the information of the Web Map Service at the position were the user clicked. This is what I have coded so far: var pickColor = Cesium.Color.CYAN.withAlpha(0.7); var

翻译 Cesium入门教程(二)------图层 Imagery Layers

和自甴很熟 提交于 2020-04-14 03:09:51
【今日推荐】:为什么一到面试就懵逼!>>> 转载请注明出处 http://my.oschina.net/u/149294/blog/202464 本人建了一个QQ群:115883691,欢迎大家一起来讨论Cesium相关技术 Cesium支持通过许多标准的服务,渲染和以图层的方式组织高分辨率的地图,图层可以是有序的并且可以融合(blend)在一起。每个图层的亮度、对比度、伽马值、色调以及饱和度都能动态的更改。本教程将介绍一个图层方面的概念和相关的Cesium APIs。 开搞 我们先暂时忽略掉一些细节,直接开始写几句代码来添加一些图层。首先打开Sandcastle中得HelloWorld。这个例子创建了一个CesiumWidget,它包含了一个渲染Bing maps的单一图层。通过个CesiumWidget的构造函数传递一个附加参数,我们可以另外定义一个底图图层。我们使用Esri ArcGIS MapServer的数据作为底图。 var widget = new Cesium.CesiumWidget('cesiumContainer', { imageryProvider : new Cesium.ArcGisMapServerImageryProvider({ url : 'http://server.arcgisonline.com/ArcGIS/rest/services

翻译 Cesium入门教程(一)------环境配置 Hello World

橙三吉。 提交于 2020-04-13 16:20:54
【今日推荐】:为什么一到面试就懵逼!>>> 转载请注明出处 http://my.oschina.net/u/149294/blog/202433 本人建了一个QQ群:115883691,欢迎大家一起来讨论Cesium相关技术 首先确保你的浏览器支持Cesium 判断你的浏览器是否支持Cesium最简单的办法就是看你是否能成功的运行cesium的helloworld例子( 点这里(要翻墙才行) ),假如你看到如下的图像,祝贺你,你可以开始下边的步骤了(其实不翻墙你是看不到了,不过也没关系,只要你用的是最新版的firefox或者google chrome就没问题)。 Cesium用到了很多HTML5的技术,其中最重要的是WebGL。尽管这些标准正在被越来越广泛的应用,但是很多的浏览器和系统还是需要更新至新版版才能支持他们。假如上面的例子不能工作,这儿还有一些方法可以试试。 更新你的浏览器,Cesium团队大多使用Google Chrome,但是firefox,Safari和其他的一些浏览器也能很好的工作,假如你使用的是上面这些浏览器中的一种,那么确保你更新到了最新版。不幸的是当前版本的IE还不支持WebGL(貌似最新版支持了,不过没试过)。 升级你的显卡驱动。 假如还是不行,去http://get.webgl.org/看看,它提供了一些解决问题的建议。最后你可以到论坛寻求帮助。

cesiumjs开发实践(六) CZML

杀马特。学长 韩版系。学妹 提交于 2020-03-01 00:27:22
CZML是cesium中很重要的一个概念,也是一个亮点,CZML使得cesium很酷很炫地展示动态数据成为可能。 CZML是一种JSON格式的字符串,用于描述与时间有关的动画场景,CZML包含点、线、地标、模型、和其他的一些图形元素,并指明了这些元素如何随时间而变化。某种程度上说, Cesium 和 CZML的关系就像 Google Earth 和 KML。 CZML 的一个典型结构如下 [ // packet one { "id": "GroundControlStation" "position": { "cartographicDegrees": [-75.5, 40.0, 0.0] }, "point": { "color": { "rgba": [0, 0, 255, 255] }, } }, // packet two { "id": "PredatorUAV", // ... } ] 如上CZML片段描述了两个包(packet,这里每个包描述了一个点),每个包的id,position和color。 每个包都有一个 id 属性用来唯一标识这个对象。id不一定要求用GUIDs,但是最好在载入场景中CZML中能够唯一单个的 对象 。如果id没有指定, cesium会自动生成一个,但是,这样在后续处理中会遇到麻烦,比如后面的操作中需要引用这个 对象 并给它添加更多的数据。除了