View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

UC Milestone 4 - Case Page

Our work


Uploaded Image: P4-MAP.GIF


Uploaded Image: P4-UML.gif



For getting all the information from GT alumni, we used a separate parser (non-squeak) to gather all the building info off the alumni website. We then reused our P2 codes completely, and added in all the additional informations that we got from our non squeak parser.

Once we got all of the information on the map, we ran into some problems being able to zoom in the way that we wanted to. We wanted to show the building pictures on all levels of zoom, allow clicking on the buildings on all levels of zoom, and have the clickable areas (and building pictures) get larger the more we were zoomed in.

To accomplish this, we went through a series of attempts before the legendary algorithm master A-lex (that is– Alexander Powell) took over and created the algorithm from scratch, and got it right the first time. The algorithm goes throughg each of the buildings each time we change the zoom level and point of view of the map display and redraws them if they are visible in our "camera."

It starts by setting the size of the building, which is coded to be (14 pixels X the current scaling factor). It then scales the top and left points of the buildings to match the scaling factor (topLeftPoint X scaling factor). Then, it calculates an offset point, similar to the following:

myOffset _ ((transformMorph offset ) / window height) asFloat.

(WARNING: this is not real code... just from memory).

Then, we have our offset and our size, and all that is left to be done is cull those buildings which would not be in our view (simple bounds checking of the offset were used to make sure that the x and y values were in between 0.0 and 1.0 before drawing).

Simple enough, eh?



So what went right??




One of the things that definitely went right was the decision to parse out all of the relevant information on the buildings from the gtalumni webpage. The parser, which downloaded the info from the page and converted it into Squeak code with building names, locations, and addresses, made the gathering of the information on the buildings infinetely simpler. It also made the task of loading the buildings go much faster than having our Squeak program dynamically parse the website every time the map was created. Considering the load times our program already demanded, this was definitely one of the main things that went right. The decision to use a ZoomTransformMorph was also a very good decision. This made zooming in on specific areas of the map as simple as a single call to one of the ZoomTransformMorph's functions.




But what went WRONG?!?!




One of the things that went wrong with the map might be the size of the buttons and images used on the map. Although this did not really cause any problems with the functionality of the map, in some areas of the map the buildings were condensed to a point where they would overlap each other. This made the map's appearance less attractive and also made it where a click on a certain point would load info on more than one building. Another problem that we had was correctly locating the points on which to zoom in and zoom out. Although we were zooming in the right areas, our map would not center correctly on the point clicked. After some adjustments of our calculations for determining the centered point, we were able to solve this minor problem.



If only I had more time...




With more time, it would have been nice to make a better UI with clickable command buttons and menus. This would have made navigating the map much simpler to a less advanced user and also would have increased the appeal of the map in general. Another thing we would have liked to have done would be to make the building buttons and images a bit more spaced out. This would have definitely improved the appearance of certain areas of the map and would have prevented the loading of unwanted information on overlapping buildings. Unfortunately, this could not be done for any arbitrary map, since we don't know that the map doesn't have two small buildings right next to each other, but our algorithms could have been improved, never-the-less.



More Random thoughts







Link to this Page