cesium

Can Cesium map run on Apache HTTP server instead of node.js environment?

跟風遠走 提交于 2019-12-10 13:53:18
问题 I have an Apache HTTP server that handles all my requests for a Ruby on Rails project. We are thinking of adding a Cesium map component. I am wondering if I can run Cesium on the Apache HTTP server instead of setting up a node.js environment? 回答1: Yes, Cesium is completely client-side and can be served by any HTML server. 回答2: I have it running in JBoss. All I did was take the contents of the ZIP file and dropped them into the deploy area of JBoss under a Cesium.war directory. Works like a

Updating Cesium Callback Property causes the entity to flash

こ雲淡風輕ζ 提交于 2019-12-08 03:09:28
问题 Here is some code that can be pasted into a Cesium Sandcastle. It adds an entity to the map, then every second, updates the CallbackProperty for the position property. Each time it is updated the entity flashes. var viewer = new Cesium.Viewer('cesiumContainer'); var position = new Cesium.Cartesian3.fromDegrees(-114.0, 40.0, 300000.0); var constant = false; var blueBox = viewer.entities.add({ name : 'Blue box', position: new Cesium.CallbackProperty(getPos, constant), box : { dimensions : new

How to draw custom dynamic billboards in Cesium.js

╄→尐↘猪︶ㄣ 提交于 2019-12-06 05:36:36
I'm currently using Cesium for a mapping application, and I have a requirement to have status indicators for each item I'm plotting (for example, if the item I'm plotting is an airplane, then I need to have a fuel status indicator). I can't use Cesium's drawing tools to do this because they are drawn using geographic locations, but I need my status indicators to simply be located near the billboard and not get farther away from the billboard as users zoom in and out. Cesium's CZML documentation states that the billboard's "image" property can take a data URI, so I figured the easiest way to

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

时光毁灭记忆、已成空白 提交于 2019-12-05 01:39:09
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 that with cesium ? Try adding this after your first block of code above: var scene = map.scene; var

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

家住魔仙堡 提交于 2019-12-03 17:12:54
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) xi = sqrt(1 - esq * sin(lat)) x = (a / xi + alt) * cos(lat) * cos(lon) y = (a / xi + alt) * cos(lat)

Cesium how to scale a polygon to match Lat-Lon positions while zoom-in/zoom-out

Deadly 提交于 2019-12-02 12:19:42
问题 I'm looking for a Cesium Guru for a little help finding what I need. I'm new to Cesium but I've been working with the tutorials and some existing code that I've inherited. In my Cesium app, I enter my address and the view zooms in to my street. Yay! Then I zoom in closer, so I can draw a polygon around my house. The existing code does this very well. However when I zoom out and then zoom in again, my polygon does not stay true to the Lat-Lon position of my house . Does Cesium contain a

Cesium - why is scene.pickPositionSupported false

我与影子孤独终老i 提交于 2019-12-01 23:38:26
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 here . I call testMe with the mousePosition as Cartesian3 and the SceneMode is 3D, so pickGlobe is

Cesium - using camera to scale a polygon to match Lat-Lon positions while zoom-in/zoom-out

会有一股神秘感。 提交于 2019-12-01 10:28:28
问题 I am struggling with camera functionality that (I think) would provide a way to force my polygon to stick to the top of my house on zoom-out, zoom-in, and rotation (or camera move). This question follows an earlier question that was resolved. Now I need a little help resolving my next issue. The sample code I am trying to follow is located in the gold standard that appears to be baked into the existing camera controller here. pickGlobe is executed with the parameters of the viewer, the

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

£可爱£侵袭症+ 提交于 2019-11-30 04:56:47
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? I've tried creating a polygon entity with my height-laden positions, but to no avail - it just