Skip to content

Commit a3d9f5b

Browse files
gilchenzionfacebook-github-bot-6
authored andcommitted
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 facebook/react-native#4225 Reviewed By: svcscm Differential Revision: D2674060 Pulled By: nicklockwood fb-gh-sync-id: 66f069dfc53fdeae8aaab76980146296cea1140f
1 parent 0e4bd91 commit a3d9f5b

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Libraries/Components/MapView/MapView.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ var MapView = React.createClass({
8787
*/
8888
showsPointsOfInterest: React.PropTypes.bool,
8989

90+
/**
91+
* If `false` compass won't be displayed on the map.
92+
* Default value is `true`.
93+
* @platform ios
94+
*/
95+
showsCompass: React.PropTypes.bool,
96+
9097
/**
9198
* If `false` the user won't be able to pinch/zoom the map.
9299
* Default value is `true`.

React/Views/RCTMapManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ - (UIView *)view
3838

3939
RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL)
4040
RCT_EXPORT_VIEW_PROPERTY(showsPointsOfInterest, BOOL)
41+
RCT_EXPORT_VIEW_PROPERTY(showsCompass, BOOL)
4142
RCT_EXPORT_VIEW_PROPERTY(zoomEnabled, BOOL)
4243
RCT_EXPORT_VIEW_PROPERTY(rotateEnabled, BOOL)
4344
RCT_EXPORT_VIEW_PROPERTY(pitchEnabled, BOOL)

0 commit comments

Comments
 (0)