Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mesmatyi/maps-with-tsp
Small webpage designed to run a client side TSP and with that optimize for best route possible between multiple waypoints
https://github.com/mesmatyi/maps-with-tsp
map mapbox mapbox-gl-js routing tsp-solver
Last synced: about 1 month ago
JSON representation
Small webpage designed to run a client side TSP and with that optimize for best route possible between multiple waypoints
- Host: GitHub
- URL: https://github.com/mesmatyi/maps-with-tsp
- Owner: mesmatyi
- Created: 2021-02-24T20:33:46.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-15T19:53:48.000Z (almost 3 years ago)
- Last Synced: 2024-02-02T23:38:30.296Z (11 months ago)
- Topics: map, mapbox, mapbox-gl-js, routing, tsp-solver
- Language: JavaScript
- Homepage:
- Size: 1.5 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maps with TSP
[https://mesmatyi.github.io/maps-with-tsp/](https://mesmatyi.github.io/maps-with-tsp/)
![Demo view](/img/scr.png)
Small webpage designed to run a client side TSP and with that optimize for best route possible between multiple waypoints
## Main features
- Pick waypoints or segmetns on map
- Able to genrate a close to optimal route between multiple waypoints or segments
- Visualize the final route on map and export to a downloadable GPX format## TSP Solver
The client side TSP solver is implemented in the *TSP.js* file contains the following 3 different TSP algorithms:
* Nearest_Addition
* Nearest_Insertion
* Farthest_InsertionFrom the 3 output the core unction returns the one with the lowest overall length.
## Mapbox API
From the Mapbox sweet we use the [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/guides/) for Map visualization and also for dropping Markers. For route planning we use the [Mapbox Directions API](https://docs.mapbox.com/api/navigation/directions/)
The third API we use from Mapbox is the [Matrix API](https://docs.mapbox.com/api/navigation/matrix/), the return of this API call delivers the input for the client side TSP solver. By using this API we can use the solver with the real world distances between Markers instead of the bee - line.