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

chaitanyadeorukhkar
Copy link
Contributor

@chaitanyadeorukhkar chaitanyadeorukhkar 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
Copy link
Collaborator

rborn 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)

@chaitanyadeorukhkar
Copy link
Contributor Author

chaitanyadeorukhkar 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
Copy link
Collaborator

rborn commented Mar 27, 2018

@deorukhkarchaitanya I mean the real docs page, not only the PR text https://github.com/react-community/react-native-maps/blob/master/docs/mapview.md 😄

Update docs to specify that coordinate includes mock provider boolean
@chaitanyadeorukhkar
Copy link
Contributor Author

Updated the docs. Thanks again for the guidance :)

@rborn rborn merged commit dfe180e into react-native-maps:master Mar 27, 2018
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

Successfully merging this pull request may close these issues.

2 participants