Homework 10
CS1210 Computer Science 1
Due Saturday, May 1, by 10:00pm
5 points (HW 11 will be worth 7 points)
1. Modify hw10start.py in five ways listed below.
- Add a Google API key enabled for Static Maps and Geocoding services. See the lecture slides for help getting a key.
- add a Tkinter Entry widget to the GUI so that you can enter an address string (e.g. "Iowa City, IA" or "Beijing, China").
You probably should also add a Label widget near the Entry widget saying something like "Enter the location: ".
- modify the readEntryAndDisplayMap function so that it creates and displays a new map based on the address given in the Entry widget
- add buttons ( or other widget(s)) to enable changing the map zoom level, redisplaying the map each time the zoom level is changed.
You may choose your own way to do this. One way would be to use two buttons (e.g. one labeled '+' and one labeled '-', like in the simplegui2.py code in the Apr. 19 lecture slides). Clicking on either of them would change the current zoom level by 1 and recompute and redisplay the map.
- provide a way to change between standard (road) map view and satellite, terrain, and hybrid map views (suggestion: use radio buttons as in the radiobutton.py code posted with the Apr. 21 lecture slides)
- display a map pin in the center of the map. Note: for this and the previous item, in addition to adding GUI elements,
you will need to modify getMapURL to add more parts to the string sent to Google.
Submission note: Submit one .py file to ICON.