aurora-opensource / streetscape.gl

Visualization framework for autonomy and robotics data encoded in XVIZ
http://www.streetscape.gl
MIT License
912 stars 220 forks source link

Add new controller prop to LogViewer #286

Open marionleborgne opened 5 years ago

marionleborgne commented 5 years ago

Allow passing a custom map controller (http://uber.github.io/react-map-gl/#/Documentation/advanced/custom-map-controller?section=overriding-the-default-map-controller) to LogViewer via a controller prop.

Pessimistress commented 5 years ago

You can achieve this by supplying your own view mode:

const CUSTOM_VIEW_MODE = {
    name: 'custom',
    initialViewState: {
      maxPitch: 60,
      pitch: 30
    },
    mapInteraction: {
      type: CustomController
    },
    tracked: {
      position: true,
      heading: true
    }
  }