cesium

Cesium - why is scene.pickPositionSupported false

回眸只為那壹抹淺笑 提交于 2019-12-20 03:12:02
问题 I'm ultimately trying to draw a polygon on top of my house. I can do that. The problem is that on zoom-out, zoom-in, and rotation (or camera move) the polygon doesn't stick to the top of my house. I received great help from this answer. So, now I'm trying to go through the sample code but there is a lot of Cesium methods and functionality that I need to learn. The sample code I am trying to follow is located in the gold standard that appears to be baked into the existing camera controller

Cesium how to 'drape' a polygon or line onto terrain surface

自古美人都是妖i 提交于 2019-12-18 11:48:41
问题 So, I'm using cesium and I want to add a polygon or line to represent a property boundary on a terrain surface. My polygon works fine on the flat/Ellipsoid surface, unfortunately however the polygon doesn't automagically drape over the surface when the terrain layer is shown. Fair enough, I don't actually have the z/height values - so I'm using the sampleTerrain.js promise method to interpolate the height values based on the terrain. This part works fine, I get my height values. But then what

Cesium: “fan out” overlapping polylines?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 19:21:27
问题 I am using Cesium and am looking to visually represent multiple polylines between the same two entities. For example, a green polyline from entity A to entity B, and also a blue polyline from entity A to entity B. I would like them not to overlap or blend, so I am imagining a fanning out as more lines are drawn, so that each line and what it represents can be visualized. I've included a crude drawing of what I'm trying to explain with the fanning out rather than overlapping. I have a

Cesium path onto terrain: line connecting 2 points goes under the terrain

≡放荡痞女 提交于 2019-12-12 18:06:28
问题 I have a path moving over time. I use Cesium.sampleTerrain to get positions elevation and drape them on the terrain. The problem is that, even if all points are on the terrain, the line connecting 2 points sometimes goes under the terrain. How can I do to drape also connecting lines on the terrain? Here is my code: var promise = Cesium.sampleTerrain(terrainProvider, 14, positions); Cesium.when(promise, function(updatedPositions) { var cartesianPositions = Cesium.Ellipsoid.WGS84

Is it normal this dark image in Cesium?

北慕城南 提交于 2019-12-11 21:18:55
问题 I think my Cesium globe is too dark. Here is two images: one from Cesium and other from OpenLayers, both from same location and same geoserver layer. Already set viewer.scene.globe.enableLighting = true; as you can see in image below: My setup: viewer = new Cesium.Viewer('cesiumContainer',{ timeline: false, animation: false, baseLayerPicker: false, geocoder : false, infoBox : false, selectionIndicator : true, navigationHelpButton : false, }); viewer.scene.globe.enableLighting = true; var

adding selected object to array returns undefined except for the current one in Cesium

99封情书 提交于 2019-12-11 17:06:28
问题 I'm trying to write a function to multi select object in Cesium. my problem is that when I select the first object, it is saved in the array "Selected[0]" but when I select the second object, a value will be stored in "Selected1" while "Selected[0]" becomes undefined! I need the array to remember all the selected objects and give them all the highlighted color, for now it only changes the color for the currently selected, the one saved in the "Selected" array Here is my code in Plunker In the

Qt GraphicWebView Segmentation fault (sigsegv) when loading cesiumJS with Natural earth

こ雲淡風輕ζ 提交于 2019-12-11 13:52:38
问题 I created a Qt widget project and added a webEngine or webKit. On webEngine or webKit I set the url to a localhost and loaded the CesiumJS default HelloWorld.html. JUST IT. When I selected "natural earth" as map, the application has trhow a SIGSEGV error (segmentation fault). What in Qt can throw this error? how can i avoid this. Is there any webView configuration (memory limit, Local Storage, etc)? This is my Main.qml import QtQuick 2.5 import QtQuick.Window 2.2 import QtWebEngine 1.1 Window

How to reference positions of other entities in polygon hierarchy of Cesium using javascript?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 00:23:08
问题 I am using Cesium to visualize my scenario and I want to create a polygon in JavaScript using position of other moving entities as references for its endpoints. As suggested in the answer of this question by using CZML . I was wondering if I can do it (referencing positions of other entities as endpoints of my polygon) in JavaScript . I tried a few things and it didn't work, for example, following is my code: var newPoly= viewer.entities.add({ id : resourceSet[objIndex].id+"poly", name

cesium: How to set Z-index of different shapes in Cesium?

ε祈祈猫儿з 提交于 2019-12-10 20:43:16
问题 How to set Z-index of different shapes in Cesium? Refer Screen shot below: I want the billboard icons inside the cylinder to be displayed over the cylinder. Thanks in advance! 回答1: It's not easy because your cylinders are actual 3D volumes, and your billboard is inside them. There's no CSS-style Z-indexing going on in the 3D rendering engine, just the depth buffer deciding on a per-pixel basis what's closest to the camera. The surface of the cylinder will always be closer than the center of

Responsive DIVs in CesiumViewer [CesiumJS]

邮差的信 提交于 2019-12-10 19:57:01
问题 I am working on customizing a Cesium map that has an overlay with a variety of information inside, the style of the overlay I'm implementing with bootsrap, unfortunately the divs that I put remain in a specific position and ignore the resizing of the page. Is there a way to make a DIV added to cesium viewer responsive? What i do now is var position = Cesium.Cartesian3.fromDegrees(-76.59777, 39.03883); var scratch = new Cesium.Cartesian2(); var canvasPosition = viewer.scene