How to I use loop to show multiple billboard dynamically

How do I loop the following billboard settings to show all the 26 results loaded from the API?

propertyPlacemark.push(viewer.entities.add({

name : “HDB”,

position : Cesium.Cartesian3.fromDegrees(parseFloat(lonlatArray), parseFloat(lonlatArray), 100),

orientation : new Cesium.HeadingPitchRoll(0, 0, 0),

billboard: {

image:’./icons/hdb.png’,

width:60,

height:60,

verticalOrigin: Cesium.VerticalOrigin.BOTTOM,

eyeOffset : new Cesium.Cartesian3(0.0, 0.0, 0.0)

}

}));

propertyPlacemark.push(viewer.entities.add({

name : “HDB”,

position : Cesium.Cartesian3.fromDegrees(parseFloat(lonlatArray), parseFloat(lonlatArray),0),

polyline : {

positions : new Cesium.Cartesian3.fromDegreesArrayHeights([parseFloat(lonlatArray[0]), parseFloat(lonlatArray[1]), 0,

parseFloat(lonlatArray[0]),parseFloat(lonlatArray[1]), 100]),

outline : true,

outlineColor : Cesium.Color.RED,

outlineWidth : 3,

material : Cesium.Color.RED

}

}));

You should be able to just create a regular JavaScript for loop, and for each entry create a placemark as you have there.

It would be a good idea to start out with just a loop that prints out the values with console.log to make sure you have that set up correctly.

What kind of application are you working on?

This can work by calling your function in the loop that is grabbing the 26 results from the API.

addLabel(lat, long);

I have no idea if this is the best way to do it optimally, but it can work.