my react-native-maps MapView won't drag I can't seem to figure out why. I'm looking for an indicator of some sort to find it, but everything looks good to me and example code from other websites aren't helping. Is there something I'm missing?
import React, { Component } from 'react'
import {
StyleSheet,
Dimensions,
} from 'react-native'
import MapView, {
PROVIDER_GOOGLE
} from 'react-native-maps'
const { width, height } = Dimensions.get('window')
const ASPECT_RATIO = width / height
let LATITUDE = 40.3096
let LONGITUDE = -111.7071
let LATITUDE_DELTA = 0.0922
let LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO
class Maps extends Component<any, any> {
constructor(props: any) {
super(props)
this.state = {
region: {
latitude: LATITUDE,
longitude: LONGITUDE,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA
}
}
}
render() {
return (
<MapView
provider={PROVIDER_GOOGLE}
style={styles.map}
initialRegion={this.state.region}
onRegionChangeComplete={(region) => {this.setState(
region = {
latitude: region.latitude,
longitude: region.longitude,
latitudeDelta: region.latitudeDelta,
longitudeDelta: region.longitudeDelta
}
)}}
>
</MapView>
)
}
}
const styles = StyleSheet.create({
map: {
flex: 1,
minHeight: Dimensions.get('screen').height,
zIndex: 0
},
})
export default Maps
Is there something I'm doing wrong?