Welcome to HalfWay- An app that helps you meet everyone halfway!
Live Link link
Repo Link link
With ticket prices, attractions via TripAdvisor and more!
Using React with Trip Advisor and Google Cloud Translate and Twilio Chat Apis to make a truly international app!
Calculates the midpoint using a formula that converts your geolocation into radians then pinpoints the closest airports with the most affordable tickets and best attractions
The best education in my belief is getting out of your comfort zone and exploring the world. Halfway explores the notion that two people, instead of visiting each other, go on an adventure together to someplace neither has been, that's HalfWay.
By providing ticket prices and attraction information and calculating a midpoint, HalfWay can assist in everything from planning an urban hangout to an international odyssey. And it can be a powerful equalizer for people from nations with visa restrictions or other challenges to engage and meet face-to-face with would be mentors and inspirational figures...by meeting them halfway!
Meet Yourself HalfWay
Meet your Destiny HalfWay
Meet the World HalfWay
componentDidMount() {
var midPoint = function (latitude1, longitude1, latitude2, longitude2) {
var DEG_TO_RAD = Math.PI / 180; // To convert degrees to radians.
// Convert latitude and longitudes to radians:
var lat1 = latitude1 * DEG_TO_RAD;
var lat2 = latitude2 * DEG_TO_RAD;
var lng1 = longitude1 * DEG_TO_RAD;
var dLng = (longitude2 - longitude1) * DEG_TO_RAD; // Diff in longtitude.
// Calculate mid-point:
var bx = Math.cos(lat2) * Math.cos(dLng);
var by = Math.cos(lat2) * Math.sin(dLng);
var lat = Math.atan2(
Math.sin(lat1) + Math.sin(lat2),
Math.sqrt((Math.cos(lat1) + bx) * (Math.cos(lat1) + bx) + by * by));
var lng = lng1 + Math.atan2(by, Math.cos(lat1) + bx);
// debugger
return ({
latitude: lat / DEG_TO_RAD,
longitude: (lng / DEG_TO_RAD)
});
}
if (this.props.location2) {
// debugger
const lat1 = this.props.location.lat
const lng1 = this.props.location.lng
const lat2 = this.props.location2.lat
const lng2 = this.props.location2.lng
var midLocation = midPoint(lat1, lng1, lat2, lng2)
// console.log(midLocation)
this.setState({
"lat": midLocation.latitude,
"lng": midLocation.longitude
})
// debugger
} else {
// debugger
const lat = this.props.location.lat
const lng = this.props.location.lng
this.setState({
"lat": this.props.location.lat,
"lng": this.props.location.lng,
})
}
}
This project was bootstrapped with Create React App.
Available Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
npm run eject
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
Learn More
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build
fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
Log in or sign up for Devpost to join the conversation.