cesium

How to define property type in SampledProperty in Cesium

天涯浪子 提交于 2019-12-24 17:25:03
问题 I am using Cesiumjs to create a polygon which is moving around an area. To show its movement I tried to create a sampledProperty of PolygonHierarchy . Each sample is an array of Cartesian3 positions (three endpoints of my polygon at each time step). I need to know the type of the property that I am using in sampledProperty as it is mentioned in Cesiumjs website: Cesiumjs.org/SampledProperty. But I don't know how to define it and I couldn't find any explanation on the website on how to

Call method inside iframe that holds a Cesium map

冷暖自知 提交于 2019-12-24 05:49:50
问题 I can normally call a method that is inside the html of an iframe using this approach: document.getElementById("frame_id").contentWindow.method_in_frame(); I can also call methods outside the iframe using the parent approach: onclick="parent.method_outside_frame(); But if my iframe is holding an instance of the Cesium map this does not work. Does cesium having something that stops this from happening? Is there a way to override it? 回答1: Found the answer. You need to change the default

Call method inside iframe that holds a Cesium map

醉酒当歌 提交于 2019-12-24 05:48:01
问题 I can normally call a method that is inside the html of an iframe using this approach: document.getElementById("frame_id").contentWindow.method_in_frame(); I can also call methods outside the iframe using the parent approach: onclick="parent.method_outside_frame(); But if my iframe is holding an instance of the Cesium map this does not work. Does cesium having something that stops this from happening? Is there a way to override it? 回答1: Found the answer. You need to change the default

Cesium czml change orientation of 3d model (gltf/glb) along with position in time

空扰寡人 提交于 2019-12-23 13:01:20
问题 I have implemented a 3d model (cesium air) aircraft to move along a path. Its position is being changed based on time and the detailed data is available in the czml file under position attribute. However, I am not able to change the orientation of the aircraft along with path. The aircraft flies through the path but its heading , pitch and roll are constant. It does not pitch up with increase in height etc. How to implement the attitude changes using orientation attribute in the czml file or

How to Set the Default View Location (Cesium 1.6)

安稳与你 提交于 2019-12-23 07:56:01
问题 I want to set the default view/home location for a cesium app. I don't just want to flyTo the location once; I want the location set as the default/home - so that it can be used elsewhere in the app - e.g. in the HomeButton Widget. I've tried setting the Camera.DEFAULT_VIEW_RECTANGLE (docs here) like this: var extent = Cesium.Rectangle.fromDegrees(117.940573,-29.808406,118.313421,-29.468825); viewer.camera.DEFAULT_VIEW_RECTANGLE = extent; But it doesn't work.. For completeness, here's how I'm

Cesium - drawing polygon using camera Lat-Lon-Alt positions

允我心安 提交于 2019-12-23 03:12:25
问题 This question is related to these two: Cesium how to scale a polygon to match Lat-Lon positions while zoom-in/zoom-out Cesium - using camera to scale a polygon to match Lat-Lon positions while zoom-in/zoom-out The sample code I am following to get lat-lon-alt positions from the camera is located in the gold standard that appears to be baked into the existing camera controller. With this code I can retrieve lat-lon-alt positions from the distance of the camera to get values that are almost

Custom cesium html billboard

假如想象 提交于 2019-12-23 02:42:29
问题 I would like to be able to create a div and give it a height, width, and class. Then add the div to a Cesium map as a billboard. I can create billboards with images and labels and also found this link about how to use an svg, but I am having trouble figuring out how to make the billboard contain dynamically produced html. The project this is in uses class names to apply font icons to divs. Is there a way to insert the html into a billboard? Or is there another class that would be better

How to set Cesium JS map center (coordinates: latitude & longitude)

*爱你&永不变心* 提交于 2019-12-22 03:44:33
问题 I would like to initialize cesium so that the map is centered on some specific coordinates instead of the default ones. I have the following initialization code: var map = new Cesium.CesiumWidget('map-js'); map.centralBody.terrainProvider = new Cesium.CesiumTerrainProvider({ url : 'http://cesiumjs.org/smallterrain' }); Usually, with other mapping libraries, I would set the center on initialization, eg on mapbox: map = L.mapbox.map('map-js', 'api-key').setView([42.12, 12.45], 9); How to do

What is the lightest possible method of using Cesium?

送分小仙女□ 提交于 2019-12-21 09:18:23
问题 I'm interested in using Cesium to build a 3D Earth with custom tiles, but as per the "get started" instructions here, it seems as though you have to download a massive 30mb directory and include the whole thing in your project to have it run correctly. Is this true? Can I not just include Cesium.js and get running like that? I don't need 80% of the UI elements they include anyways. At the end of the "get started" tutorial, they seem to indicate that all you need to get running are these bits:

How do I convert a geodetic location to an ECF position that works with the terrain model in Cesium

妖精的绣舞 提交于 2019-12-21 05:48:14
问题 I'm trying to put a point at the top of Mount Everest in Cesium. My most likely candidate as of last night was the code I borrowed to do geodetic to ecef conversion (from PySatel.coord). Upon review this morning, it appears to be correct: a = 6378.137 b = 6356.7523142 esq = 6.69437999014 * 0.001 e1sq = 6.73949674228 * 0.001 f = 1 / 298.257223563 def geodetic2ecef(lat, lon, alt): """Convert geodetic coordinates to ECEF. Units are degrees and kilometers. """ lat, lon = radians(lat), radians(lon