Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Zeller AlexZeller

View GitHub Profile
View Cesium-drawLine_2
var viewer = new Cesium.Viewer('cesiumContainer');
var screenSpaceEventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
var startPoint = new Cesium.Cartographic();
var endPoint = new Cesium.Cartographic();
// Event handler for left click
screenSpaceEventHandler.setInputAction(function(click) {
View Cesium-drawLine_1
var viewer = new Cesium.Viewer('cesiumContainer');
var screenSpaceEventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
var startPoint = new Cesium.Cartographic();
var endPoint = new Cesium.Cartographic();
// Event handler for left click
screenSpaceEventHandler.setInputAction(function(click) {
View Cesium_pick_terrain
var viewer = new Cesium.Viewer('cesiumContainer');
var screenSpaceEventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
//Function to add a point
function addPoint(x,y) {
var point = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(x, y),
View Cesium_VR_1.0
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var camera = viewer.camera;
var destination = new Cesium.Cartesian3();
function flyToLocation() {
// Create callback for browser's geolocation