Skip to content

Commit

Permalink
Add custom map styles to the Overlap map (Path-Check#246)
Browse files Browse the repository at this point in the history
The custom styles were taken from https://snazzymaps.com/style/127403/no-label-bright-colors
which was linked to in the issue Path-Check#243

Closes Path-Check#243
  • Loading branch information
thetimbanks authored and jgrainger-745 committed Apr 1, 2020
1 parent 3a7a561 commit 7fcc527
Showing 1 changed file with 104 additions and 1 deletion.
105 changes: 104 additions & 1 deletion app/views/Overlap.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ class OverlapScreen extends Component {
<MapView
provider={PROVIDER_GOOGLE}
style={styles.main}
initialRegion={this.state.initialRegion}>
initialRegion={this.state.initialRegion}
customMapStyle={customMapStyles}>
{this.state.markers.map(marker => (
<Marker
coordinate={marker.coordinate}
Expand Down Expand Up @@ -460,4 +461,106 @@ const styles = StyleSheet.create({
},
});

const customMapStyles = [
{
featureType: 'all',
elementType: 'all',
stylers: [
{
saturation: '32',
},
{
lightness: '-3',
},
{
visibility: 'on',
},
{
weight: '1.18',
},
],
},
{
featureType: 'administrative',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'landscape',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'landscape.man_made',
elementType: 'all',
stylers: [
{
saturation: '-70',
},
{
lightness: '14',
},
],
},
{
featureType: 'poi',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'road',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'transit',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
],
},
{
featureType: 'water',
elementType: 'all',
stylers: [
{
saturation: '100',
},
{
lightness: '-14',
},
],
},
{
featureType: 'water',
elementType: 'labels',
stylers: [
{
visibility: 'off',
},
{
lightness: '12',
},
],
},
];

export default OverlapScreen;

0 comments on commit 7fcc527

Please sign in to comment.