Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radius property not working #25

Open
gabsbelini opened this issue Dec 12, 2018 · 1 comment
Open

Radius property not working #25

gabsbelini opened this issue Dec 12, 2018 · 1 comment

Comments

@gabsbelini
Copy link

gabsbelini commented Dec 12, 2018

I'm trying to use the radius property on a latLng point that does not have a valid Street View on that specific point but has a valid one on a 100m search radius, according to the API.

What I did:

<StreetView
          allGesturesEnabled={true}
          coordinate={{'latitude': -23.376721, 'longitude': -51.908538}}
          radius={100}
        />

What I got

It renders a Black Screen as if there is not Street View for that region, even with a 100m search radius.

When I check this issue using the following API endpoint:

https://maps.googleapis.com/maps/api/streetview/metadata?key=MY_API_KEY&location=-23.376721,-51.908538&radius=100

I get a return value stating that there is a valid Street View for that latLng using a 100m search radius.

Am I missing something or is this a problem with the Library?

Thanks!

@RuudBurger
Copy link
Contributor

RuudBurger commented Dec 19, 2018

Haven't tested this, but I think you need to add the radius inside your coordinates.. That is how it is read on the iOS native side.

<StreetView
    allGesturesEnabled={true}
    coordinate={{'latitude': -23.376721, 'longitude': -51.908538, radius: 100}}
/>

Also see https://github.com/nesterapp/react-native-streetview/blob/master/js/StreetView.js#L17-L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants