--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/u0ZrY7rBGUw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
var position = Cesium.Cartesian3.fromDegrees(-0.14532, 42.78988, 2202);map.entities.add({ position : position, billboard :{ image : '../images/Cesium_Logo_overlay.png', verticalOrigin : Cesium.VerticalOrigin.BOTTOM, width: 120, height: 90 }});Cesium.BingMapsApi.defaultKey = 'Aom2vE0RuXkxP1q_HNC7ZIsOrwBM10E36Ilf4xNR5YjDoodbMIR-0dlHZRHomJ7U';var map = new Cesium.Viewer("cesiumContainer", { animation: false, automaticallyTrackDataSourceClocks: false, baseLayerPicker: true, //false, //terrainProvider: new Cesium.createWorldTerrain(), bottomContainer: {hidden:true}, //creditContainer: " ", fullscreenButton: false, geocoder: false, homeButton: false, infoBox: true, mapProjection: new Cesium.WebMercatorProjection(), navigationInstructionsInitiallyVisible: false, scene3DOnly: true, selectionIndicator: false, //vrButton: true, //virtual reality: depth in screen //imageryProvider : Cesium.createOpenStreetMapImageryProvider({ // url : 'https://a.tile.openstreetmap.org/' //}), timeline: false});
// OLD OLD OLD //var terrainProvider = new Cesium.CesiumTerrainProvider({// url: 'https://assets.agi.com/stk-terrain/world', // requestVertexNormals: true//});// NEW NEW NEW: As per 1 sept 2018 the provider below is Deprecated; use the Cesium.createWorldTerrain in steadvar terrainProvider = new Cesium.createWorldTerrain({ requestVertexNormals: true});map.terrainProvider = terrainProvider;map.scene.fxaa = false; // sharper image :O)
// set centermap.camera.setView({ destination: Cesium.Cartesian3.fromDegrees(-0.14608, 42.78951, 5000), orientation: { heading: Cesium.Math.toRadians(180.0), pitch: Cesium.Math.toRadians(-90.0), roll: 0.0 }});
var track = [ [-0.15133, 42.79047, 2468], [-0.14937, 42.79080, 2409], [-0.14980, 42.78981, 2383], [-0.14811, 42.78983, 2327], [-0.14697, 42.78899, 2283], [-0.14646, 42.78972, 2251], [-0.14608, 42.78951, 2235], [-0.14532, 42.78988, 2202], [-0.14375, 42.79063, 2154], [-0.14304, 42.79140, 2149], [-0.14256, 42.79240, 2149], [-0.14125, 42.79291, 2151], [-0.14125, 42.79291, 2151]];var coords = [];for (var i=0; i<track.length; i++) { coords[i] = Cesium.Cartesian3.fromDegrees(track[i][0], track[i][1], track[i][2]);}var line = map.entities.add({ polyline: { show: true, positions: coords, width: 2, material: Cesium.Color.RED }});
function lonLatPicture(lon, lat, alt, theImage, x, y) { theImage.onload = function() { map.entities.add({ position: Cesium.Cartesian3.fromDegrees(lon, lat, alt), billboard: { image: theImage, verticalOrigin: Cesium.VerticalOrigin.BOTTOM, width: x, height: y } }); };}; // lonLatPicture
var theImage = new Image();if (location.hostname === "localhost") theImage.src = "//localhost/Pictures/FlagGreen.png";else theImage.src = "./Pictures/FlagRed.png";lonLatPicture(-0.14125, 42.79291, 2151, theImage, 70, 70);https://groups.google.com/forum/m/#!topic/cesium-dev/24rOR01Q2nk
Both issues occur using Cesium World Terrain, after you toggle the terrain provider to the ellipsoid and back again to world terrain. Thx.
>> I added also 1000m to the track alti's but even than the track didn't pop up :O(BTW, the alti's are the real altitudes taken from a gps device when we made that hike.
>> If the real alti's are available then it is not a nice thing to add extra artificial height meters to the data. The data is used for plots and analysis as well. Terrain clamping should do the job for displaying the track in the Cesium map. (-> Gabby?)
The second issue is that different behavior occurs in Sandcastle than on your webhost.>> This one is really frustrating. Why is there different behavior between my local development PC and the same code (Cesium 1.44 + test app) on the web host. I'm looking forward for an explanation...., since I'm not sure I do the right things. By uploading the same (stripped) Cesium 1.44 version from development PC to web host (as suggested by Gabby) I expected the same behavior.
Thanx for sharing some pain with polylines on terrain :O)
I hope the Cesium.js core will soon support clampToGround for polylines, to simplify solving the display of data like our GPX files. Google Earth has supported this for years. Cesium positioned themselves as a migration path from the GE browser plugin for developers, but never finished this ClampToGround feature for polylines.
We've got Materials on polygons clamped-to-ground coming in June, but still no line features !!! I'm going to take a break from Cesium development, and try again later this year, if/when the polyline clampToGround feature ever gets released.