Created
August 5, 2021 06:59
-
-
Save adrianhajdin/ede527249054b7abbdf4e3a9fac95b5e to your computer and use it in GitHub Desktop.
Build and Deploy a Google Maps Travel Companion Application | React.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { alpha, makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles((theme) => ({ | |
title: { | |
display: 'none', | |
[theme.breakpoints.up('sm')]: { | |
display: 'block', | |
}, | |
}, | |
search: { | |
position: 'relative', | |
borderRadius: theme.shape.borderRadius, | |
backgroundColor: alpha(theme.palette.common.white, 0.15), | |
'&:hover': { backgroundColor: alpha(theme.palette.common.white, 0.25) }, | |
marginRight: theme.spacing(2), | |
marginLeft: 0, | |
width: '100%', | |
[theme.breakpoints.up('sm')]: { marginLeft: theme.spacing(3), width: 'auto' }, | |
}, | |
searchIcon: { | |
padding: theme.spacing(0, 2), height: '100%', position: 'absolute', pointerEvents: 'none', display: 'flex', alignItems: 'center', justifyContent: 'center', | |
}, | |
inputRoot: { | |
color: 'inherit', | |
}, | |
inputInput: { | |
padding: theme.spacing(1, 1, 1, 0), paddingLeft: `calc(1em + ${theme.spacing(4)}px)`, transition: theme.transitions.create('width'), width: '100%', [theme.breakpoints.up('md')]: { width: '20ch' }, | |
}, | |
toolbar: { | |
display: 'flex', justifyContent: 'space-between', | |
}, | |
})); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles((theme) => ({ | |
formControl: { | |
margin: theme.spacing(1), minWidth: 120, marginBottom: '30px', | |
}, | |
selectEmpty: { | |
marginTop: theme.spacing(2), | |
}, | |
loading: { | |
height: '600px', display: 'flex', justifyContent: 'center', alignItems: 'center', | |
}, | |
container: { | |
padding: '25px', | |
}, | |
marginBottom: { | |
marginBottom: '30px', | |
}, | |
list: { | |
height: '75vh', overflow: 'auto', | |
}, | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles(() => ({ | |
paper: { | |
padding: '10px', display: 'flex', flexDirection: 'column', justifyContent: 'center', width: '100px', | |
}, | |
mapContainer: { | |
height: '85vh', width: '100%', | |
}, | |
markerContainer: { | |
position: 'absolute', transform: 'translate(-50%, -50%)', zIndex: 1, '&:hover': { zIndex: 2 }, | |
}, | |
pointer: { | |
cursor: 'pointer', | |
}, | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default [ | |
{ | |
featureType: 'all', | |
elementType: 'all', | |
stylers: [ | |
{ | |
saturation: '32', | |
}, | |
{ | |
lightness: '-3', | |
}, | |
{ | |
visibility: 'on', | |
}, | |
{ | |
weight: '1.18', | |
}, | |
], | |
}, | |
{ | |
featureType: 'administrative', | |
elementType: 'labels', | |
stylers: [ | |
{ | |
visibility: 'on', | |
}, | |
], | |
}, | |
{ | |
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', | |
}, | |
], | |
}, | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles(() => ({ | |
chip: { | |
margin: '5px 5px 5px 0', | |
}, | |
subtitle: { | |
display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: '10px', | |
}, | |
spacing: { | |
display: 'flex', alignItems: 'center', justifyContent: 'space-between', | |
}, | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'https://www.foodserviceandhospitality.com/wp-content/uploads/2016/09/Restaurant-Placeholder-001.jpg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places&key=your key here></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://openweathermap.org/img/w/${data.weather[0].icon}.png |
hi there,
Is there one more push with latest version of material UI for this project. I tried to upgrade I got white screen every times.
Thankyou
Really helpful. Thank you @adrianhajdin :)
Thanks man
when i am running the travel app git link on sandbox to run the project online it is showing error can anyone help me how to run the travel advisory app online or on my machine to show this to someone??
Thats Great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Man there are 2 Mapstyles which one to put where