I am using the following code with no success:
//Inside of NativeBase Container
<MapView.Animated
ref="map"
style = {styles.map}
showsUserLocation = {true}
zoomEnabled = {true}
showsMyLocationButton = {true}
showsCompass = {true}
showScale = {true}
showsIndoors = {true}
mapType = {this.state.mapTypes[this.state.mapTypeCode]}
/>
//Inside of componentDidMount of the class
navigator.geolocation.getCurrentPosition(
(position) => {
var initialPosition = JSON.stringify(position.coords);
this.setState({position: initialPosition});
let tempCoords = {
latitude: Number(position.coords.latitude),
longitude: Number(position.coords.longitude)
}
this.refs.map.animateToCoordinate(tempCoords, 1);
}, function (error) { alert(error) },
);
But an error occurs saying there is no such function animateToCoordinate.