var viewer = new Cesium.Viewer('cesiumContainer'); var scene = viewer.scene; var handlerA = new Cesium.ScreenSpaceEventHandler(scene.canvas); handlerA.setInputAction(function(click) { var pickedObject = scene.pick(click.position); if (Cesium.defined(pickedObject)) { $.ajax({ type: 'GET', url: 'InfoBox.php', data: (pickedObject.id.id).val(), success: function(result) { pickedObject.id.description = "The temperatur of " + result.town + " is " + result.temp + " degrees..."; } }); } }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
pickedObject.id is the entity.