Lab 3
- Pick a new partner - not anyone that you worked with in the past.
- With your partner, complete all parts of the following:
- Map Tour
- Map Tour - Part 2
- Android, Where's My Car?
- Create a new app that is similar to Map Tour - Part 2, but adds the following:
- Show the Cal Poly map image (from http://maps.calpoly.edu/images/Core.gif) in place of the Paris map image
- Create three list pickers with labels: "Choose Building", "Choose Origination", and "Choose Destination"
- Your screen should look something like this:
- When the user clicks any of the list pickers, the choices should be the following: Computer Science, University Union, Library, a building of your choice on the Cal Poly campus
- When the user selects a building through "Choose Building", go to the corresponding location in Google maps (similar to Map Tour - Part 2)
- When the user selects both an origination and a destination through "Choose Origination" and "Choose Destination", show the corresponding directions in Google maps (similar to Android, Where's My Car?)
- Make the "Choose Destination" button disabled until the user chooses a building through "Choose Origination".
- Only enter the coordinates for a location once; this will involve changing (refactoring) the dataURIs list; use these coordinates to construct the strings that you send to Google Maps both for showing a destination and for getting directions
- Create two procedures that return values, one called "BuildBuildingString" and one called "BuildDirectionsString." The purpose of the BuildBuildingString procedure is to construct the DataURI string to give to Google Maps to display the location of a building. The purpose of the BuildDirectionsString procedure is to construct the DataURI string to give to Google Maps to show the directions from a source address to a destination address.
- Demo your app to Dr. Janzen in lab
- On your own, on your lab 3 page in your e-portfolio,
- declare who you worked with
- paste in an image of your solution from the Blocks Editor
- Answer the following question:
- Suppose you were provided three functions that retrieved 1) a list with an unknown number of buildings, 2) a corresponding list of longitude coordinates, and 3) a corresponding list of latitude coordinates from the web.
- Would you need to modify your two functions "BuildBuildingString" and "BuildDirectionsString", or the code that calls these functions?
- Describe what else you would modify in your app to use these functions to make the building list from the web available to the user.
Grading Rubric
- Cal Poly Tour Demo: 15 pts
- Choose Building: 3 pts
- Building on Map: 3 pts
- Choose Origination (Destination not enabled): 3 pts
- Choose Destination: 3 pts
- Path on Map: 3 pts
- e-portfolio Lab 2: 20 pts
- partner name: 2 pts
- Cal Poly Tour blocks image: 3 pts
- Coordinates in single place: 3 pts
- BuildBuildingString: 3 pts
- BuildDestinationString: 3 pts
- question 1 - any modifications?: 3 pts
- question 2 - other modifications?: 3 pts