How to disable interpolation of a CZML model?
Hi @fation - does this thread answer your question? - Stopping CZML data interpolation - #2 by Matt_Amato
The suggestion there was to use the availability
property - here’s a Sandcastle example.
I have done this way but i am using a model and a polygon they move along, and the way the model is moving is showing a flickering . For the polygon this is not happening. The poligon looks like is updating the position and the model looks like is destroyed and recreated.
Hm, that doesn’t sound right… could you please post a Sandcastle example of your code?
It happens when the viewer animates for the first time.
Have you tested?
@fation I believe this is happening because the model is being loaded from scratch at each interval. We have an example multi-part CZML Sandcastle that looks similar to what you’re doing. A few things of note -
- the model is only loaded in the first (part1) .czml file
- note the logic to use a
preloadTimeInSeconds
to load czml slightly before it’s needed:
partsToLoad
.filter(function (part) {
return (
!part.requested &&
timeOffset >= part.range[0] - preloadTimeInSeconds &&
timeOffset <= part.range[1]
);
})
.forEach(function (part) {
processPart(part);
});
Let us know if you have any questions!