Hi, this is the implementation of the @urbica/react-map-gl. This will show the navigation directions using the Navigation API using the source and destination that the user enters on the fields using the Geocoding API.
This is a simple implementation of the Mapbox JS API and you can check their website for further usage.
- The Frontend is made using ReactJS
- The Backend is made using Django
- Clone the git repo using the git clone command.
- Go to the MapDemo folder and open CMD in it and execute the following commands in order:-
cd mapdemo
venv\Scripts\activate
cd src
python manage.py runserver
- The Django server will start and the URL will be displayed on the console.
- Copy the URL or Click This Link and open it in the Browser.
- Enter the source and destination and click on submit to get the navigation details.
- Clear button will clear the navigation on the map.
The ReactJS part can be seen on the following repository Mapbox ReactJS API