The objetive of this exercise is to fetch information from an API and show it on a map. Using MapBox tool. The API has data about Route1 from Boston, USA. In the map, there are some makers to localize where are buses in Real-time. There are two features more. First feature to plan a route if we establish two points before (origin and destination) And the second one is to get the lattitude and longitude where you click on the screen.
To setup this proyect in your machine, follow these steps:
- Clone or download the project
- Go to the folder where is the project.
- Open it in your code editor.
- Go to MapBox website and get an API Token.
- Replace mapboxgl.accessToken = "YOUR_TOKEN".
- Open index.html
- When map is loaded, every 7 seconds the data about buses' location will be uploaded.
If you have any question please send an email to: daniel_tenezaca@hotmail.com.
Copyright (c) 2021 Daniel Tenezaca
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Files
- index.html
- mapanimation.js
- project_details.html
- README.md
- LICENSE
- styles.css
- /icons
- 0_bus.png
- 1_bus.png
- 2_bus.png
- 3_bus.png
- 4_bus.png
- 5_bus.png
- 6_bus.png
- 7_bus.png
- 8_bus.png
- 9_bus.png
- 0_bus-stop.png
- 1_bus-stop.png
- 2_bus-stop.png
- 3_bus-stop.png
- 4_bus-stop.png
- 5_bus-stop.png
- 6_bus-stop.png
- 7_bus-stop.png
- 8_bus-stop.png
- 9_bus-stop.png
- busstop.svg