Skip to content

Add Mock Provider boolean on each location update#2132

Merged
rborn merged 2 commits intoreact-native-maps:masterfrom
chaitanyadeorukhkar:master
Mar 27, 2018
Merged

Add Mock Provider boolean on each location update#2132
rborn merged 2 commits intoreact-native-maps:masterfrom
chaitanyadeorukhkar:master

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
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
…2132)

* Add Mock Provider boolean on each location update

* Update mapview.md

Update docs to specify that coordinate includes mock provider boolean
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