how-far-from-north-pole
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A simple web application that calculates the distance from the user's current location to the North Pole.
- 📍 Geolocation: Uses the browser's geolocation API to get the user's current position
- 🧭 Distance Calculation: Calculates the great circle distance to the North Pole using the Haversine formula
- 📏 Unit Conversion: Allows users to toggle between kilometers and miles
- 🎨 Responsive Design: Clean, mobile-friendly interface using TailwindCSS
- ⚡ Real-time Updates: Distance updates instantly when switching between units
- Click "Get My Location" to request location access
- The app uses the browser's geolocation API to get your coordinates
- It calculates the distance to the North Pole (90°N, 0°E) using the Haversine formula
- Toggle between kilometers and miles to see the distance in your preferred unit
- Distance Calculation: Uses the Haversine formula for calculating great circle distances on Earth
- Earth Radius: 6,371 km (mean radius)
- Conversion Factor: 1 km = 0.621371 miles
- Geolocation Options: High accuracy enabled with 10-second timeout
- Location data is only used for distance calculation
- No location data is stored or transmitted to any server
- All calculations happen in your browser
Requires a modern browser with:
- Geolocation API support
- JavaScript enabled
- HTTPS connection (required for geolocation)
Simply visit the web app and click "Get My Location" to start!