I am using react-native-streetview library to load street view in my app. But it shows only black screen. Can anyone please help me with where I am going wrong.
<View style={styles.container}>
<StreetView
style={styles.streetView}
allGesturesEnabled={true}
coordinate={{
'latitude': -33.852,
'longitude': 151.211
}}
/>
</View>
PS: I am using react-navigation library in my app.
答案 0 :(得分:0)
尝试使用我的叉子https://github.com/chrise86/react-native-streetview。
我更改了在本机桥中加载坐标的方式。我还在heading
组件上指定了<Streetview />
道具:
<StreetView
style={styles.streetView}
allGesturesEnabled={true}
coordinate={{ latitude, longitude }}
heading={180}
onSuccess={() => console.log('map loaded')}
onError={(event) => console.log('failed to load map', event.nativeEvent)}
/>