Giter VIP home page Giter VIP logo

Comments (7)

chrise86 avatar chrise86 commented on September 10, 2024 2

I just get a completely black screen on iOS on simulator and actual device. Has anyone managed to resolve this issue?

from react-native-streetview.

herlan-evocorp avatar herlan-evocorp commented on September 10, 2024 1

@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;
}

from react-native-streetview.

amitpdev avatar amitpdev commented on September 10, 2024

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

from react-native-streetview.

vs1682 avatar vs1682 commented on September 10, 2024

@scotbond I'm facing the same problem. I'm using react-navigation as navigation library.

from react-native-streetview.

brianfoody avatar brianfoody commented on September 10, 2024

@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!

from react-native-streetview.

stevanus1997 avatar stevanus1997 commented on September 10, 2024

i have same problem any one solve it?

from react-native-streetview.

adimshev avatar adimshev commented on September 10, 2024

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%'
    }
});

from react-native-streetview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.