You will notice that a portion of the base-map (beneath the torque layer) is not displayed and also the following errors are seen on the console
torque.full.uncompressed.js:3338 Uncaught TypeError: Cannot read property 'call' of undefined
at e.ol.CanvasLayer._render (torque.full.uncompressed.js:3338)
at e (events.js:41)
at e.dispatchEvent (Target.js:101)
at e.renderFrame_ (PluggableMap.js:1257)
at e.<anonymous> (PluggableMap.js:191)
The simple fix noted below fixes this issue on line 3338 of torque.full.uncompressed.js, and Torque would thereafter work with OL 5.3.0.
if (this.requestAnimationFrame && this.requestAnimationFrame.call) {
this.currentAnimationFrame = this.requestAnimationFrame.call(window, this.render);
}
First of all, the existing example does not work unless you fix the CDN URLs. See below for some URLs that work.
Next, the way in which the code is written does seem to create issues on newer OL versions. For example, try with the following CDN URLs:
You will notice that a portion of the base-map (beneath the torque layer) is not displayed and also the following errors are seen on the console
The simple fix noted below fixes this issue on line 3338 of torque.full.uncompressed.js, and Torque would thereafter work with OL 5.3.0.