This Vue.js web application allows user to submit one pickup and drop-off point. It display the waypoints returned from the backend(API call).
The App is live here
- User submit one pickup and drop-off point. Address fields are come with autocomplete options.
POST
method with address content to the Mock API byaxios
. It purposed to collecttoken
.- Make API call by
GET
method withtoken
from last step. Various status response as below:
in progress
: It represent server side still in progress. Then it process retry instantly max to 5 times. VariableretryCounter
are editable inMyMap.vue
.Collecting route in progress...
message will inform user by green text.failure
: PrintLocation not accessible by car
message to user by red text.success
: Printtotal distance
andtotal distance
to screen. Also render marker and route in map.
- Install nodeJS
# install dependencies
npm install
- Generating an Google Maps API key
- Enable
Maps JavaScript API
- Enable
Places API
(for autocomplete feature)
Replace YOUR-GOOGLE-API-KEY
and YOUR-MOCK-API-DOMAIN
㊙️ with your own key
㊙️ Hints: https://mock-api.dev.XXX.com
# serve with hot reload at localhost:8080 with ESLint errors and warnings
npm run dev
Unit test files path
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
# Build for production with minification to
# Out put dir: dist/
npm run build
See Vue.js official deployment guidelines for more information.
For now it conflits with autocomplete feature. For example when the value is out of autocomplete options list(e.g. abc888
). Then input value keep as empty(not abc888
). Which do not consistant with front-end value(abc888
).