#include <MapVisuals.H>
Collaboration diagram for MapVisuals:
Public Member Functions | |
MapVisuals (DBInterface *db, bool tiles=false) | |
virtual | ~MapVisuals () |
bool | areTilesGenerated () |
Since the TilesGeneration method isn't really called by another component it doesn't really need to be shown on the interface. Instead we will have a method that returns true if the tiles have been generated. If its false then we know that the tiles haven't been made. | |
string | drawRoute (path_t *route, int dZoom=-1, int sX=0, int sY=0, int Pan=0, string routeID="") |
PathDesc is a struct that is defined elsewhere in our program. I will use this struct to obtain graphical information from the database so that I can draw out a path. The zoom parameter will determine how big this path must be drawn, in order to accommodate the map that is being shown by the webGUI. I then draw this route on the tiles and return the whole image to the webGUI. For right now, I am returning a QImage, but most likely that will change. | |
string | routeInstructions (path_t route) |
PathDesc is a struct that is defined elsewhere in our program. Using the struct, I am able to obtain intersection information that I can then use to call getPath on the database. Once I have obtained the all the information, this method will create a string that will give the user instructions on how to get to their destination. | |
seg_t | streetHit (double x, double y) |
Once a user clicks on a portion of the map, I am returned an x and y coordinate. Using the coordinates I check if the user clicked on a road and then return the streetSeg that the user clicked on. | |
Private Attributes | |
MapGenerator * | m_mGenerator |
Pointer to an instance of MapGenerator, which is responsible for drawing an actual route. | |
int | m_argc |
Parameter indicating the number of parameters being passed in. | |
char * | m_argv |
Parameter indicating a file name. | |
DBInterface * | m_db |
Pointer to an instance of the database, where MapVisuals gets data to perform its tasks. |
|
|
|
|
|
Since the TilesGeneration method isn't really called by another component it doesn't really need to be shown on the interface. Instead we will have a method that returns true if the tiles have been generated. If its false then we know that the tiles haven't been made.
|
|
PathDesc is a struct that is defined elsewhere in our program. I will use this struct to obtain graphical information from the database so that I can draw out a path. The zoom parameter will determine how big this path must be drawn, in order to accommodate the map that is being shown by the webGUI. I then draw this route on the tiles and return the whole image to the webGUI. For right now, I am returning a QImage, but most likely that will change.
|
Here is the call graph for this function:
|
PathDesc is a struct that is defined elsewhere in our program. Using the struct, I am able to obtain intersection information that I can then use to call getPath on the database. Once I have obtained the all the information, this method will create a string that will give the user instructions on how to get to their destination.
|
|
Once a user clicks on a portion of the map, I am returned an x and y coordinate. Using the coordinates I check if the user clicked on a road and then return the streetSeg that the user clicked on.
|
|
Parameter indicating the number of parameters being passed in.
|
|
Parameter indicating a file name.
|
|
Pointer to an instance of the database, where MapVisuals gets data to perform its tasks.
|
|
Pointer to an instance of MapGenerator, which is responsible for drawing an actual route.
|