A navigation and path-planning system focused on Yingtan and Guixi cities in Jiangxi Province, China. This project combines OpenStreetMap data with Gaode Maps API to provide accurate routing and location search capabilities. The interactive page is in Chinese.
- Interactive map display of Yingtan and Guixi cities using Leaflet and OpenStreetMap
- Shortest path routing between two points using directed A* search
- Detailed navigation instructions with turn-by-turn guidance
- Path visualization on the map
- Location search functionality using Gaode Maps API
- Hybrid point selection (manual map clicks or location search)
- Detailed route information display including:
- Total distance and estimated time
- Turn-by-turn navigation instructions
- Path segments with distance and time estimates
- Support for different road types (motorway, trunk, etc.) with speed limit considerations
- Vue.js
- Leaflet for map visualization
- Gaode Maps API for location services
- C++
- Crow framework for HTTP server
- JSON for data handling
- crow
- json
- leaflet
- Leaflet
- A C++17 compiler and CMake 3.16 or newer
- Node.js 20.19+ or 22.12+ and npm
- Clone the repository
- Configure and build the project:
cmake -S backend -B backend/build cmake --build backend/build
- Run the backend from the repository root:
Pass an OSM file as the first argument or set
./backend/build/MapNavigation
MAP_NAVIGATION_OSM_PATHto override the defaultbackend/data/mapofyt.osm. Deployment can also setMAP_NAVIGATION_ALLOWED_ORIGINandMAP_NAVIGATION_BIND_ADDRESS.
- Navigate to the frontend directory
- Copy
.env.exampleto.env.local, create a Gaode JavaScript API key, and setVITE_AMAP_JS_KEYandVITE_API_BASE_URL. Restrict the key to the exact development and production domains in the Gaode console. For production, setVITE_AMAP_SERVICE_HOSTto a reverse proxy that stores thesecurityJsCodeserver-side. The plaintextVITE_AMAP_SECURITY_CODEfallback is intended for local development only. Values prefixed withVITE_are embedded in the browser bundle and are not server secrets. - Run the following command:
npm ci npm run serve
- Access the application at http://localhost:8080/
Security: never commit real keys to this repository. If a key has already been committed, revoke or rotate it in the Gaode console; removing it from the latest source does not remove it from Git history.
- Implements A* path finding with one-way-road support
- Projects requested coordinates onto the nearest road segment
- Supports various road types with different speed limits
- Includes coordinate transformation between GCJ-02 and WGS-84 systems
- Implements comprehensive road network representation
- Supports various road types and attributes
- Handles complex intersection scenarios
- Integration of traffic light information into path planning
- Implementation of machine learning and deep learning methods for smarter routing
- UI/UX improvements
- Enhanced map visualization
This project focuses on Guixi, a county-level city in Yingtan, Jiangxi Province. While the current scope is limited by the city's transportation infrastructure (only two bus routes in Guixi, no subway for both cities), it serves as a foundation for future enhancements and improvements.
I was born in Guixi and grew up in Guixi, so I have a deep connection to these cities. Due to my studies and work, I have fewer and fewer opportunities to return to Guixi. This project is a way for me to give back to my hometown and contribute to its development (even if only in a small way, I hope).
If you have any questions or suggestions, please feel free to contact me by email: hy20051123@gmail.com.