Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new iOS mutedStandard map-type #1824

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/mapview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| `region` | `Region` | | The region to be displayed by the map. <br/><br/>The region is defined by the center coordinates and the span of coordinates to display.
| `initialRegion` | `Region` | | The initial region to be displayed by the map. Use this prop instead of `region` only if you don't want to control the viewport of the map besides the initial region.<br/><br/> Changing this prop after the component has mounted will not result in a region change.<br/><br/> This is similar to the `initialValue` prop of a text input.
| `liteMode` | `Boolean` | `false` | Enable lite mode. **Note**: Android only.
| `mapType` | `String` | `"standard"` | The map type to be displayed. <br/><br/> - standard: standard road map (default)<br/> - satellite: satellite view<br/> - hybrid: satellite view with roads and points of interest overlayed<br/> - terrain: (Android only) topographic view
| `mapType` | `String` | `"standard"` | The map type to be displayed. <br/><br/> - standard: standard road map (default)<br/> - satellite: satellite view<br/> - hybrid: satellite view with roads and points of interest overlayed<br/> - terrain: (Android only) topographic view<br/> - standardMuted: more subtle, makes markers/lines pop more (iOS only)
| `customMapStyle` | `Array` | | Adds custom styling to the map component. See [README](https://github.com/airbnb/react-native-maps#customizing-the-map-style) for more information.
| `showsUserLocation` | `Boolean` | `false` | If `true` the app will ask for the user's location. **NOTE**: You need to add `NSLocationWhenInUseUsageDescription` key in Info.plist to enable geolocation, otherwise it is going to *fail silently*!
| `userLocationAnnotationTitle` | `String` | | The title of the annotation for current user location. This only works if `showsUserLocation` is true. There is a default value `My Location` set by MapView. **Note**: iOS only.
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface MapViewProps {
showsTraffic?: boolean;
showsIndoors?: boolean;
showsIndoorLevelPicker?: boolean;
mapType?: 'standard' | 'satellite' | 'hybrid' | 'terrain' | 'none';
mapType?: 'standard' | 'satellite' | 'hybrid' | 'terrain' | 'none' | 'mutedStandard';
region?: { latitude: number; longitude: number; latitudeDelta: number; longitudeDelta: number; };
initialRegion?: { latitude: number; longitude: number; latitudeDelta: number; longitudeDelta: number; };
liteMode?: boolean;
Expand Down
1 change: 1 addition & 0 deletions lib/components/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const MAP_TYPES = {
HYBRID: 'hybrid',
TERRAIN: 'terrain',
NONE: 'none',
MUTEDSTANDARD: 'mutedStandard',
};

const GOOGLE_MAPS_ONLY_TYPES = [
Expand Down
3 changes: 3 additions & 0 deletions lib/ios/AirMaps/RCTConvert+AirMap.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ + (MKCoordinateRegion)MKCoordinateRegion:(id)json
@"standard": @(MKMapTypeStandard),
@"satellite": @(MKMapTypeSatellite),
@"hybrid": @(MKMapTypeHybrid),
@"satelliteFlyover": @(MKMapTypeSatelliteFlyover),
@"hybridFlyover": @(MKMapTypeHybridFlyover),
@"mutedStandard": @(MKMapTypeMutedStandard)
}), MKMapTypeStandard, integerValue)

// NOTE(lmr):
Expand Down