Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @startuml
- actor Traveler
- actor "Google Directions API" as Directions
- actor "Google Maps API" as Maps
- box Front-End
- participant ":System\nAndroid Cell Phone" as Android
- end box
- box Back-End
- participant ":System\nBack-End Server" as Server
- end box
- loop while sd1
- ref over Traveler, Server : sd1: View Pollutant Map
- Traveler -> Android : selectNavMode(navMode)
- Android -->> Traveler : display nav input view
- opt if user wants to origin from location other than current location
- loop while user entering origin
- Traveler -> Android : updateOriginTextBox(input)
- Android -> Maps : requestLocations(originTextBox)
- Maps -->> Android : originLocations
- Android -->> Traveler : showPossibleLocations(originLocations)
- break
- Traveler -> Android : selectOrigin(originLocation)
- end
- end
- end
- loop while user entering destination
- Traveler -> Android : updateDestinationTextBox(input)
- Android -> Maps : requestLocations(destinationTextBox)
- Maps -->> Android : destinationLocations
- Android -->> Traveler : showPossibleLocations(destinationLocations)
- break
- Traveler -> Android : selectDestination(destinationLocation)
- end
- end
- Traveler -> Android : provideEndpoints(origin, destination)
- Android -> Server : requestRoute(origin, destination, navMode, preferences)
- Server -> Directions : requestNavRoutes(navMode)
- Directions -->> Server : fastRoute
- Server -> Server : getPollutants(location)
- Server -> Server : calculateSafestRoute(origin, destination, fastRoute)
- Server -->> Android : fastRoute, safeRoute, hasPollution
- opt if hasPollution
- Android ->> Traveler : showLessSafeWarning
- end
- Android -->> Traveler : showRoutesView(fastRoute, safeRoute)
- opt if user selects more info
- Traveler -> Android : askRouteDetails
- Android -->> Traveler : showRouteDetails(directions, hazards, duration, tolls)
- end
- opt if user clears route
- Traveler -> Android : clearRoute
- Android -->> Traveler : showMapView
- end
- end
- @enduml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement