Entity details

Hi, i'd like to add some details about entity when user clicks on it. Details i recieve from database.

I saw example "picking" and i have a question:

Is it possible to add some my home-made parameters (something like this) wroten in UPPERCASE:

var entity = viewer.entities.add({
    id: 'billboard1',
    position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
    billboard : {
        image : '../images/Cesium_Logo_overlay.png'
    FNAME: data[i].p_fname,
    LNAME: data[i].p_lname

Or i have to declare variable FNAME and LNAME and the I could do something like that. Thank you in front!!


Information displayed in the InfoBox that appears when you click on an entity is populated by the name and description properties of the entity. The name shows up on the box header, and the description can be HTML that shows up as the box content. So you can use the information from the database to set the description property. Here is a quick example:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {timeline : false, animation : false});

var pinBuilder = new Cesium.PinBuilder();

var FNAME= ‘first’;
var LNAME = ‘last’;
name : ‘Title’,
description: 'First: ’ + FNAME + ’
Last: ’ + LNAME,
position : Cesium.Cartesian3.fromDegrees(-75.170726, 39.9208667),
billboard : {
image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),
verticalOrigin : Cesium.VerticalOrigin.BOTTOM