Docs - explain how to access the geolocation API

Summary:
Explain that, unlike other APIs, geolocation follows the browser spec and is exposed through `navigator.geolocation` rather than as an `react-native` export.

This can be inferred from the example code but isn't otherwise stated in the docs. See also https://github.com/facebook/react-native/pull/9793
Closes https://github.com/facebook/react-native/pull/9810

Differential Revision: D3841341

Pulled By: javache

fbshipit-source-id: b1423e8bf7fb78c788f5cdc5630a4a948b8178c6
This commit is contained in:
Rob Hogan 2016-09-09 05:28:34 -07:00 committed by Facebook Github Bot 1
parent 8cfa7340d1
commit 384ebac28a
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ type GeoOptions = {
* The Geolocation API follows the web spec:
* https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
*
* As a browser polyfill, this API is available through the `navigator.geolocation`
* global - you do not need to `import` it.
*
* ### iOS
* You need to include the `NSLocationWhenInUseUsageDescription` key
* in Info.plist to enable geolocation. Geolocation is enabled by default