I’ve written a few functions to draw draggable and static points in Cesium. However, I have a big issue when using these together.
I can draw draggable points by clicking on the map, and move them around by clicking and dragging. But if I plot a static point after plotting a draggable point, the draggable point jumps to the location of the static point! I can still drag the point, but it always snaps back to the static points location.
Here’s a Sandcastle demo to illustrate my problem - http://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=54a2252d95768ca89d23948ad010356a
In this example, any click on the map will create a draggable point (red points). There are two timeouts at the end of the script, one of which will draw a static point after 5s, and the other will plot a static point at a different location after 10s. The static points are purple and a lot smaller than the draggable ones.
As you’ll see, if you draw a draggable point in the first 5s, it will jump to the location of the first static point.
What’s going on?!