Difference between revisions of "CSC220 Homework 6 2010"
(→Part 2) |
(→Requirements and Submission) |
||
Line 42: | Line 42: | ||
:(You do not need to submit the accessinfo.php file.) | :(You do not need to submit the accessinfo.php file.) | ||
+ | |||
+ | =Suggestions and Advices= | ||
+ | |||
+ | * When you create the accessinfo.php file, make sure to make it readable by all with '''chmod''' | ||
+ | * The program that populates the table with kml files does not set the date field of the records correctly. The date and time shown are actually the date and time when the file was uploaded, not when it was recorded by the iPhone. Feel free to manually or programmatically update this field. | ||
+ | * Pairs of kml files contain very similar contents. That's normal, as they were recorded by two people following (mostly) the same paths! | ||
=Optional and Extra-Credit= | =Optional and Extra-Credit= |
Revision as of 10:38, 28 October 2010
--D. Thiebaut 14:43, 28 October 2010 (UTC)
This homework is due on 10/4 evening, at midnight. You can work in pairs on this assignment.
This assignment is more open-ended than usual. It asks you to do some research on your own, adapt some code, and make something work. For this reason, this is a very good assignment to work on with a partner. Do not hesitate to associate with somebody else in the class to work on this, in pair programming mode, i.e. two people working on one computer at the same time (and it will give you an opportunity to analyze your partner's personality! ;-)
It is based on the very good tutorial Using PHP/MySQL with Google Maps by Google Geo Team member Pamela Fox.
Contents
Part 1
- Read Pamela Fox's tutorial. Feel free to build all the tables and files she is presenting in the tutorial, and create the same output as she is.
Part 2
- Use phpmyadmin to explore the database 220a_hw6. You should have access to it. It contains 12 different KML files that were gathered during Fall break (by a friend and I riding bikes on campus). For your information, here's the program I used to populate the table kmldata with the different kml files that were stored in a directory called abvio in my 220a account.
- Your assignment is to
- copy the table kmldata into your own database (this is mostly to allow you to modify it as you see fit). Keep the name of the table the same, please, so that I can test your program easily.
- using the information from Fox's tutorial, create a php/mysql Web page that will pick one of the kml files from the database and generate a (static) Google map from it. Note: you do not have to worry about domxml for this assignment. Domxml is a library that php can use to generate xml out of hierarchical information. In our case the xml code is already built and stored in the column `data` of the mysql table `kmldata`. All you have to do is to get it and output it to Google.
Requirements and Submission
- Call your php program hw6.php, and make it get your credentials from a file called accessinfo.php, as you did in Lab 7.
- Make the Web page that outputs the Google Map also show your name(s) as well as any other information you feel makes the page self-contained, explaining what it is showing.
- Submit a dump of your copy of the kmldata table. You are free to modify its contents to make your job easier, or to enhance how the display works. Call the dump kmldata.sql.
- Submit the files as follows:
submit hw6 hw6.php submit hw6 kmldata.sql
- (You do not need to submit the accessinfo.php file.)
Suggestions and Advices
- When you create the accessinfo.php file, make sure to make it readable by all with chmod
- The program that populates the table with kml files does not set the date field of the records correctly. The date and time shown are actually the date and time when the file was uploaded, not when it was recorded by the iPhone. Feel free to manually or programmatically update this field.
- Pairs of kml files contain very similar contents. That's normal, as they were recorded by two people following (mostly) the same paths!
Optional and Extra-Credit
- Make your php file a form that offers the user to select one of the kml files to display. You are free on the method used to pick one of the files.