MCPcopy Create free account
hub / github.com/react-native-maps/react-native-maps / animateCamera

Method animateCamera

src/MapView.tsx:841–854  ·  view source on GitHub ↗
(camera: Partial<Camera>, opts?: {duration?: number})

Source from the content-addressed store, hash-verified

839 }
840
841 animateCamera(camera: Partial<Camera>, opts?: {duration?: number}) {
842 if (this.fabricMap.current) {
843 this.fabricMap.current.animateCamera(
844 camera,
845 opts?.duration ? opts.duration : 500,
846 );
847 } else if (this.map.current) {
848 Commands.animateCamera(
849 this.map.current,
850 camera,
851 opts?.duration ? opts.duration : 500,
852 );
853 }
854 }
855
856 animateToRegion(region: Region, duration: number = 500) {
857 if (this.fabricMap.current) {

Callers

nothing calls this directly

Calls 1

animateCameraMethod · 0.65

Tested by

no test coverage detected