Hi,
I am using Cesium to create a timeline with tracks. The tracks in Cesium are created using function addTrack, which calls .push to create a new track and put into a canvas container. How do I create opentip for each of those object within the HTML canvas element?
Please help.
Below is part of the code:
function Timeline(container, clock) {
container = getElement(container);
var topDiv = document.createElement('div');
topDiv.className = 'cesium-timeline-main';
container.appendChild(topDiv);
this._topDiv = topDiv;
Hi, I am using Cesium to create a timeline with tracks. The tracks in Cesium are created using function addTrack, which calls .push to create a new track and put into a canvas container. How do I create opentip for each of those object within the HTML canvas element?
Please help.
Below is part of the code: function Timeline(container, clock) { container = getElement(container); var topDiv = document.createElement('div'); topDiv.className = 'cesium-timeline-main'; container.appendChild(topDiv); this._topDiv = topDiv;
:::: Timeline.prototype.addTrack = function(interval, heightInPx, color, backgroundColor) { var newTrack = new TimelineTrack(interval, heightInPx, color, backgroundColor); this._trackList.push(newTrack); this._lastHeight = undefined; this.resize(); return newTrack; }; ::: } function TimelineTrack(interval, pixelHeight, color, backgroundColor) { this.interval = interval; this.height = pixelHeight; this.color = color || new Color(0.5, 0.5, 0.5, 1.0); this.backgroundColor = backgroundColor || new Color(0.0, 0.0, 0.0, 0.0); }
:::: context.fillStyle = this.color.toCssColorString(); context.fillRect(0, renderState.y, renderState.timeBarWidth, this.height); :::: }