// deck.gl // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors import React, {Component} from 'react'; import {_StatsWidget as StatsWidget} from '@deck.gl/widgets'; import {readableInteger} from '../utils/format-utils'; import {MAPBOX_STYLES, DATA_URI, GITHUB_TREE} from '../constants/defaults'; import App from 'website-examples/line/app'; import {makeExample} from '../components'; class LineDemo extends Component { static title = 'Flights To And From London Heathrow Airport'; static data = [ { url: `${DATA_URI}/flight-path-data.txt`, worker: '/workers/flight-path-data-decoder.js' }, { url: `${DATA_URI}/airports.json` } ]; static code = `${GITHUB_TREE}/examples/website/line`; static hasDeviceTabs = true; static parameters = { width: { displayName: 'Width', type: 'range', value: 3, step: 0.1, min: 0, max: 10 } }; static mapStyle = MAPBOX_STYLES.DARK; static renderInfo(meta) { return (

Flight paths in a 6-hour window

From 08:32:43 GMT to 14:32:43 GMT on March 28th, 2017

Flight path data source: The OpenSky Network
Airport location data source: Natural Earth

No. of Line Segments{readableInteger(meta.count || 0)}
); } render() { const {params, data, ...otherProps} = this.props; const widgets = [new StatsWidget({type: 'device'})]; return ( ); } } export default makeExample(LineDemo);