programatically updating appearances of dynamic objects added using CZML


we are trying to get a traditional ‘rollover’ effect on polygons added via CZML… a sort of temporary highlight with a billboard following the mouse while the pointer is over a polygon.

in the sandcastle there is an example showing this, however its source of polygons was programmatic: not czml.

on experimenting ourselves we find that their appearances seem ‘unmodifiable’, updating their material/uniforms/color properties has no effect.

we then stumbled across this:

where it seems J.L was having the same problem, and solved it with what seems to be a fairly involved strategy.

My question is:

  1. is this thread still current, i.e. is it confirmed that dynamic objects coming from CZML still can’t be updated directly

  2. if so, what is the “this.visualizers.update(currentTime);” method that the thread refers to ? is it: DataSourceDisplay.prototype.update ? sorry if this is a dense question.

or should we be holding off coding any workarounds, as this is not a super important feature at this stage.



to continue this thread, instead of modifying the visualizer update function, which i’m concerned might not be super-sustainable, we now create a polylinecollection to which we add the current roll-over geometry to as the mouse moves, which works pretty well.

the only problem is that the polyline collection is rendered beneath the DynamicPolygon, so the ‘selected’ polyline is partially obliterated by the features it is ‘mirroring’

i wonder if it is well known that dynamic objects always render on top, if so, is there a fix / workaround for that ?



has no effect.