Hello,
How can I add consistent points on an entity. In the below example, let’s say I am adding few cars and few devices. Lets say in example, 4 cars 6 devices. so first 2 cars will have 2 devices and rest of them will have 1 device. Each device to be notated as a point on the car model. When I add points like below, if I zoom many levels, i get points show on correct spots, if i zoom out, points seem to be centered onto the car. I want to stick points onto car specific locations and when model gets rendered those points must be at exact locations no matter zoom level.
// CAR
viewer.entities.add({
...,
position: new CesiumJs.ConstantPositionProperty(***),
model: createModelOptions(),
});
// DEVICE
if (Devices.length > 0) {
Devices.forEach((device: any) => {
viewer.entities.add({
...,
position: new CesiumJs.ConstantPositionProperty(***),
point: {
pixelSize: 5,
color: CesiumJs.Color.RED,
outlineColor: CesiumJs.Color.WHITE,
outlineWidth: 2,
},
})
});
}
I created super sample view here, hopefully it helps LINK