nesterapp / react-native-streetview

React Native Google's Panorama/StreetView component for iOS and Android.
MIT License
99 stars 52 forks source link

Return the Lat/Lng coords of the photosphere as you move though the map #36

Closed MichaelTaylor3D closed 4 years ago

MichaelTaylor3D commented 4 years ago

This PR makes the onSuccess callback possible on android, and it returns the lat and lng in the callback for the photosphere every time you move.

    <View style={styles.container}>
      <StreetView
        style={styles.streetView}
        allGesturesEnabled={true}
        coordinate={{
          latitude: 39.151607, 
          longitude: -76.859979,
        }}
        pov={{
          tilt: parseFloat(0),
          bearing: parseFloat(0),
          zoom: parseInt(1),
        }}
        onSuccess={(data) => console.log(data.nativeEvent)}
      />
    </View>

image