How to use the viewport-mercator-project.getFlyToDuration function in viewport-mercator-project

To help you get started, we’ve selected a few viewport-mercator-project examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / react-map-gl / src / utils / transition / viewport-fly-to-interpolator.js View on Github external
getDuration(startProps: MapStateProps, endProps: MapStateProps) {
    let {transitionDuration} = endProps;
    if (transitionDuration === 'auto') {
      // auto calculate duration based on start and end props
      transitionDuration = getFlyToDuration(startProps, endProps, this.props);
    }
    return transitionDuration;
  }
}