I’m trying to avoid calling viewer.entities.add
over and over again in a loop. I have about 1000 points I’m trying to populate and was wondering if there is a way to do all 1000 at once. Any help is appreciated! Thanks
for (const [index, track] of readable_message.data.entries()) {
const lat = data.latitude;
const lon = data.longitude;
viewer.entities.add({
position: Cartesian3.fromDegrees(lon, lat, 100),
name: `test ${index}`,
billboard: {
image: testPng,
color: Color.YELLOW,
scale: 0.03,
disableDepthTestDistance: Number.POSITIVE_INFINITY,
}
});
}