A progressive web application that displays your surroundings in a first-person 3D view using GPS location data and OpenStreetMap building information.
- GPS Location Tracking: High-accuracy GPS positioning with manual updates
- OpenStreetMap Integration: Retrieves surrounding buildings, roads, and landmarks
- 3D Visualization: Renders the environment in first-person view using Three.js
- Compass Orientation: Uses device orientation sensors to determine viewing direction
- Progressive Web App: Works offline and can be installed on home screens
- Responsive Design: Optimized for mobile devices
- HTML5/CSS3/JavaScript: Core web technologies
- Geolocation API: For GPS positioning
- DeviceOrientation API: For compass functionality
- OpenStreetMap & OSM Buildings: For map and building data
- Three.js: For 3D rendering
- Service Workers: For offline capabilities
- Web server with HTTPS support (required for Geolocation and DeviceOrientation APIs)
- Modern mobile browser with GPS and orientation sensor support
-
Clone the repository:
git clone https://github.com/DG1001/fpv-environment-app.git cd fpv-environment-app
-
Deploy to a web server:
- Upload the contents of the
app
directory to your web server - Ensure the server is configured for HTTPS
- Upload the contents of the
-
For local testing:
cd app python -m http.server 8000
Then navigate to
http://localhost:8000
in your browser.
- Open the application in a mobile browser
- Grant permissions for location and device orientation when prompted
- Press the "Update Position" button to get your current location
- Look around by physically rotating your device
- The 3D view will show buildings and streets from your surroundings
app/
├── css/
│ └── style.css
├── icons/
│ ├── icon-192x192.png
│ └── icon-512x512.png
├── js/
│ ├── app.js
│ ├── compass.js
│ ├── deploy.js
│ ├── gps.js
│ ├── map.js
│ └── render.js
├── index.html
├── manifest.json
├── offline.html
└── service-worker.js
- GPS Manager: Handles location retrieval with high accuracy
- Compass Manager: Processes device orientation data with smoothing algorithms
- Map Manager: Fetches and processes OpenStreetMap data
- Render Manager: Creates the 3D visualization using Three.js
- App Core: Coordinates all components and manages the application state
You can customize the application by modifying the following files:
js/app.js
: Main application settingsjs/gps.js
: GPS accuracy and update settingsjs/render.js
: Visual appearance and rendering settingsmanifest.json
: PWA settings and appearance
- Continuous position updates (currently manual updates only)
- Enhanced building details and textures
- Navigation features
- Augmented reality integration
- User location sharing
The application requires:
- Geolocation API
- DeviceOrientation API
- WebGL support
- Service Worker support
Best experienced on recent versions of:
- Chrome for Android
- Safari on iOS 13+
- Firefox for Android
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenStreetMap for map data
- OSM Buildings for building data
- Three.js for 3D rendering capabilities
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Project Link: https://github.com/DG10001/fpv-environment-app