Skip to content

Commit

Permalink
[iOS] Added showsUserLocation property support for Google Maps (react…
Browse files Browse the repository at this point in the history
…-native-maps#721)

* Added suppport for the property showsUserLocation on iOS for GoogleMaps

* CS fix
  • Loading branch information
Julien Rodrigues authored and Exilz committed Dec 9, 2016
1 parent 0f5393b commit 15c84ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/AirGoogleMaps/AIRGoogleMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
@property (nonatomic, assign) BOOL zoomEnabled;
@property (nonatomic, assign) BOOL rotateEnabled;
@property (nonatomic, assign) BOOL pitchEnabled;
@property (nonatomic, assign) BOOL showsUserLocation;

- (BOOL)didTapMarker:(GMSMarker *)marker;
- (void)didTapAtCoordinate:(CLLocationCoordinate2D)coordinate;
Expand Down
8 changes: 8 additions & 0 deletions ios/AirGoogleMaps/AIRGoogleMap.m
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,12 @@ - (void)setShowsCompass:(BOOL)showsCompass {
- (BOOL)showsCompass {
return self.settings.compassButton;
}

- (void)setShowsUserLocation:(BOOL)showsUserLocation {
self.myLocationEnabled = showsUserLocation;
}

- (BOOL)showsUserLocation {
return self.myLocationEnabled;
}
@end
1 change: 1 addition & 0 deletions ios/AirGoogleMaps/AIRGoogleMapManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(rotateEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(pitchEnabled, BOOL)
RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL)
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onLongPress, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)
Expand Down

0 comments on commit 15c84ed

Please sign in to comment.