From a3d9f5ba8406a837f59652ca2bbc5d6cf31de019 Mon Sep 17 00:00:00 2001 From: gilchenzion Date: Thu, 19 Nov 2015 02:20:23 -0800 Subject: [PATCH] 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 --- Libraries/Components/MapView/MapView.js | 7 +++++++ React/Views/RCTMapManager.m | 1 + 2 files changed, 8 insertions(+) diff --git a/Libraries/Components/MapView/MapView.js b/Libraries/Components/MapView/MapView.js index de8aaa9f7..58950c490 100644 --- a/Libraries/Components/MapView/MapView.js +++ b/Libraries/Components/MapView/MapView.js @@ -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`. diff --git a/React/Views/RCTMapManager.m b/React/Views/RCTMapManager.m index 44dd0743e..5372793a8 100644 --- a/React/Views/RCTMapManager.m +++ b/React/Views/RCTMapManager.m @@ -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)