Android after closing StreetView, I get a back box covering the screen
bitcoinvsalts opened this issue · 7 comments
Can you give more details? what navigation library are you using? are you opening StreetView as a modal over an existing map? (looks like it from your photo). Any other information related to your navigation and presentation would help
@scotbond I'm facing the same problem. I'm using react-navigation as navigation library.
@scotbond also experiencing a similar issue. When I try to inspect it the black box disappears so it's hard to provide much detail. We are using react-navigation and rendering the streetview in a child stack element. When we navigate back a black box remains on the top of the screen. Turning on inspector removes it!
i have same problem any one solve it?
@stevanus1997 this is work for me:
The street view component will not result in a black window if it does not occupy 100% of the screen.
...
styles
container: {
flex: 1
},
streetView: {
flex: 1
},
someComponent: {
width: 100,
height: 45,
}
...
render:
view container: {
street view component;
some component;
}
I just get a completely black screen on iOS on simulator and actual device. Has anyone managed to resolve this issue?
This hack works for me:
import React, { useState, useEffect } from 'react';
import { View, StyleSheet } from 'react-native';
import RNStreetView from 'react-native-streetview';
export default React.memo ( StreetView );
function StreetView ( props )
{
const [ height, setHeight ] = useState ( '0%' );
useEffect (
() => {
const timer = setTimeout (
() => setHeight ( '100%' ),
0
);
return () => clearInterval ( timer );
},
[]
);
return (
<View style={ styles.container }>
<RNStreetView
style={[ styles.streetView, { height } ]}
allGesturesEnabled
{ ...props }
/>
</View>
);
}
const styles = StyleSheet.create ({
container: {
flex: 1,
backgroundColor: '#000'
},
streetView: {
width: '100%'
}
});