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

Add Mock Provider boolean on each location update #2132

Merged
merged 2 commits into from Mar 27, 2018

Conversation

Projects
None yet
2 participants
@deorukhkarchaitanya
Copy link
Contributor

commented Mar 27, 2018

Does any other open PR do the same thing?

No

What issue is this PR fixing?

This adds a check to whether the returned location is authentic or mocked

How did you test this PR?

Tested it on my application where I am checking for mock providers

  1. Set showsUserLocation={true} in MapView component
  2. Set 'google' as your map provider
  3. Listen for onUserLocationChange which will return a callback with lat,long,speed,accuracy & boolean for isFromMockProvider

(Works only for Android)
I have tested this on Android (real device)

@rborn

This comment has been minimized.

Copy link
Collaborator

commented Mar 27, 2018

@deorukhkarchaitanya thanks for the PR 🤗
If I understand this right isFromMockProvider is available only on android.

So please update the docs as well, specifying also the above (if correct of course)

@deorukhkarchaitanya

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2018

@rborn Sorry for that. Let me just run a check and update it.

Update:
@rborn You are right. I'll be more careful next time. Thanks. :)

@rborn

This comment has been minimized.

Copy link
Collaborator

commented Mar 27, 2018

Update mapview.md
Update docs to specify that coordinate includes mock provider boolean
@deorukhkarchaitanya

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2018

Updated the docs. Thanks again for the guidance :)

@rborn rborn merged commit dfe180e into react-native-community:master Mar 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.