mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-25 16:02:50 +00:00
24 lines
636 B
Markdown
24 lines
636 B
Markdown
# FlyToInterpolator
|
|
|
|
Implements the `TransitionInterpolator` interface. Designed to use with the `transitionInterpolator` prop of [InteractiveMap](/docs/components/interactive-map.md).
|
|
|
|
This interpolator offers similar behavior to Mapbox's `flyTo` method.
|
|
|
|
```jsx
|
|
import ReactMapGL, {FlyToInterpolator} from 'react-map-gl';
|
|
|
|
<ReactMapGL
|
|
...
|
|
transitionDuration={1000}
|
|
transitionInterpolator={new FlyToInterpolator()} />
|
|
```
|
|
|
|
##### constructor
|
|
|
|
`new FlyToInterpolator()`
|
|
|
|
|
|
## Source
|
|
[viewport-fly-to-interpolator.js](https://github.com/uber/react-map-gl/tree/4.1-release/src/utils/transition/viewport-fly-to-interpolator.js)
|
|
|