Add showsCompass to MapView props

Summary: Was trying to remove the compass from the map and thought I would contribute to the project for everyone.
Closes https://github.com/facebook/react-native/pull/4225

Reviewed By: svcscm

Differential Revision: D2674060

Pulled By: nicklockwood

fb-gh-sync-id: 66f069dfc53fdeae8aaab76980146296cea1140f
This commit is contained in:
gilchenzion 2015-11-19 02:20:23 -08:00 committed by facebook-github-bot-6
parent 0e4bd91db7
commit a3d9f5ba84
2 changed files with 8 additions and 0 deletions

View File

@ -87,6 +87,13 @@ var MapView = React.createClass({
*/
showsPointsOfInterest: React.PropTypes.bool,
/**
* If `false` compass won't be displayed on the map.
* Default value is `true`.
* @platform ios
*/
showsCompass: React.PropTypes.bool,
/**
* If `false` the user won't be able to pinch/zoom the map.
* Default value is `true`.

View File

@ -38,6 +38,7 @@ RCT_EXPORT_MODULE()
RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL)
RCT_EXPORT_VIEW_PROPERTY(showsPointsOfInterest, BOOL)
RCT_EXPORT_VIEW_PROPERTY(showsCompass, BOOL)
RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(rotateEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(pitchEnabled, BOOL)