Skip to content

Commit

Permalink
Merge pull request react-native-maps#1019 from wasa4587/master
Browse files Browse the repository at this point in the history
Add showsIndoorLevelPicker -> setIndoorLevelPickerEnabled to MapView
  • Loading branch information
lelandrichardson authored Mar 26, 2017
2 parents a2b1340 + f275536 commit d795302
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void setMapType(AirMapView view, @Nullable String mapType) {
int typeId = MAP_TYPES.get(mapType);
view.map.setMapType(typeId);
}

@ReactProp(name = "customMapStyleString")
public void setMapStyle(AirMapView view, @Nullable String customMapStyleString) {
view.map.setMapStyle(new MapStyleOptions(customMapStyleString));
Expand Down Expand Up @@ -124,6 +124,11 @@ public void setShowIndoors(AirMapView view, boolean showIndoors) {
view.map.setIndoorEnabled(showIndoors);
}

@ReactProp(name = "showsIndoorLevelPicker", defaultBoolean = false)
public void setShowsIndoorLevelPicker(AirMapView view, boolean showsIndoorLevelPicker) {
view.map.getUiSettings().setIndoorLevelPickerEnabled(showsIndoorLevelPicker);
}

@ReactProp(name = "showsCompass", defaultBoolean = false)
public void setShowsCompass(AirMapView view, boolean showsCompass) {
view.map.getUiSettings().setCompassEnabled(showsCompass);
Expand Down
8 changes: 8 additions & 0 deletions components/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ const propTypes = {
*/
showsIndoors: PropTypes.bool,

/**
* A Boolean indicating whether indoor level picker should be enabled.
* Default value is `false`
*
* @platform android
*/
showsIndoorLevelPicker: PropTypes.bool,

/**
* The map type to be displayed.
*
Expand Down
1 change: 1 addition & 0 deletions docs/mapview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
| `showsBuildings` | `Boolean` | `true` | A Boolean indicating whether the map displays extruded building information.
| `showsTraffic` | `Boolean` | `true` | A Boolean value indicating whether the map displays traffic information.
| `showsIndoors` | `Boolean` | `true` | A Boolean indicating whether indoor maps should be enabled.
| `showsIndoorLevelPicker` | `Boolean` | `false` | A Boolean indicating whether indoor level picker should be enabled.
| `zoomEnabled` | `Boolean` | `true` | If `false` the user won't be able to pinch/zoom the map.
| `rotateEnabled` | `Boolean` | `true` | If `false` the user won't be able to pinch/rotate the map.
| `scrollEnabled` | `Boolean` | `true` | If `false` the user won't be able to change the map region being displayed.
Expand Down

0 comments on commit d795302

Please sign in to comment.