UNPKG

mobility-toolbox-js

Version:

Toolbox for JavaScript applications in the domains of mobility and logistics.

18 lines (17 loc) 1.16 kB
import type { AnyCanvas, RealtimeRenderState, RealtimeStyleFunction, RealtimeStyleOptions, RealtimeTrajectories, ViewState } from '../../types'; /** * Draw all the trajectories available in a canvas. * @param {HTMLCanvas|HTMLOffscreenCanvas} canvas The canvas where to draw the trajectories. * @param {ViewState} trajectories An array of trajectories. * @param {Function} style A function that returns a canvas representing a vehicle of a specific trajectory. * @param {ViewState} viewState The view state of the map. * @param {Object} options The options. * @param {boolean} options.hoverVehicleId The id of the vehicle to highlight. * @param {boolean} options.selectedVehicleId The id of the vehicle to select. * @param {boolean} options.noInterpolate If true trajectories are not interpolated but * drawn at the last known coordinate. Use this for performance optimization * during map navigation. * @private */ declare const renderTrajectories: (canvas: AnyCanvas, trajectories: RealtimeTrajectories, style: RealtimeStyleFunction, viewState: ViewState, options: RealtimeStyleOptions) => RealtimeRenderState; export default renderTrajectories;