TdkMapDisplay Class Reference
[The Control Module]

Defines the TdkMapDisplay class. More...

#include <TdkMapDisplay.h>

Inheritance diagram for TdkMapDisplay:

TdkDisplay TdkEventHandler TdkJNIMapDisplay List of all members.

Public Member Functions

 TdkMapDisplay (TdkCanvas *canvas)
virtual ~TdkMapDisplay ()
virtual TeBox getMapRange ()
 Calculates the bounding box of the elements being displayed.
virtual TeBox getFullMapRange ()
 Calculates the bounding box of the elements in the map (being displayed or not).
virtual TeBox getVisibleRegion ()
 Returns the region being displayed.
virtual void fit ()
 Zoom to a level where all objects in the map can be seen.
virtual void zoomArea (double x0, double y0, double x1, double y1)
 Zoom to a given area.
virtual void zoom (double factor)
 Zoom by a fixed factor maintaining the center location.
virtual void zoom (double xc, double yc, double factor)
 Zoom by a fixed factor.
virtual void translateOrigin (double dx, double dy)
 Translates the origin of the display in some direction.
virtual void pan (double dx, double dy)
 Pan (drag) the map in some direction.
virtual void center (double x, double y)
 Centers the map around a given point.
virtual void centerX (double x)
 Centers horizontally the map around a given point.
virtual void centerY (double y)
 Centers vertically the map around a given point.
virtual void draw ()
 Redraws the map (by getting all the information from the database again).
virtual bool drawObjects (int buffer=TdkCanvas::cbrBack)
 Returns true if any theme was loaded.
virtual void drawFrontObjects ()
virtual void drawGraphLegend ()
virtual void drawSelectedObjects ()
virtual void drawIdentifiedObjects ()
virtual void drawOver ()
 Redraws the map without erasing the current image displayed.
virtual void refresh ()
 Puts in the canvas the image of the last drawn map.
virtual void resize (int xmin, int ymin, int xmax, int ymax, TdkResizeMethods met=rsmPreserveScalePos)
 Change the drawble area of the canvas. Coordinates are defined in pixels.
virtual double distanceMeters (double xmin, double ymin, double xmax, double ymax)
 Calculates the distance between two given points.

Protected Member Functions

virtual void handleVSEvent (TdkEvent &event)
virtual void handleVSEvent (TdkRedrawEvent &event)
virtual void handleVSEvent (TdkRefreshEvent &event)
virtual void handleVSEvent (TdkSelectObjectsEvent &event)
virtual void handleVSEvent (TdkSelectObjectsGIDVectorEvent &event)
virtual void handleVSEvent (TdkPickEvent &event)
virtual void handleVSEvent (TdkRedrawSelectedObjectsEvent &event)
virtual void handleVSEvent (TdkZoomAreaEvent &event)
virtual void handleVSEvent (TdkSelectedObjectsBBoxEvent &event)
virtual void handleVSEvent (TdkObjectIdentificationEvent &event)
virtual void handleVSEvent (TdkClearObjectIdentificationEvent &event)
virtual void handleVSEvent (TdkThemeObjectsIdentificationEvent &event)
virtual void handleVOEvent (TdkEvent &event)
virtual void handleVSEvent (TdkViewportPolylineFeedbackEvent &event)
virtual void box (bool onlyVisible, double &xmin, double &ymin, double &xmax, double &ymax)

Detailed Description

Defines the TdkMapDisplay class.

This class is the the component responsible for graphicaly displaying a map. It has a TdkCanvas component on which it draws themap. The basic operations performed by the map display are zoom, pan, fit, draw, coordinate transformations and calculations, etc.


Constructor & Destructor Documentation

TdkMapDisplay::TdkMapDisplay ( TdkCanvas canvas  ) 

Tecgraf - GIS development team

Tdk Framework

@(#) TdkMapDisplay.cpp

virtual TdkMapDisplay::~TdkMapDisplay (  )  [inline, virtual]


Member Function Documentation

TeBox TdkMapDisplay::getMapRange (  )  [virtual]

Calculates the bounding box of the elements being displayed.

TeBox TdkMapDisplay::getFullMapRange (  )  [virtual]

Calculates the bounding box of the elements in the map (being displayed or not).

TeBox TdkMapDisplay::getVisibleRegion (  )  [virtual]

Returns the region being displayed.

void TdkMapDisplay::fit (  )  [virtual]

Zoom to a level where all objects in the map can be seen.

Reimplemented from TdkDisplay.

void TdkMapDisplay::zoomArea ( double  x0,
double  y0,
double  x1,
double  y1 
) [virtual]

Zoom to a given area.

Parameters:
x0 X world coordinate of the location at the top left corner of the area.
y0 Y world coordinate of the location at the top left corner of the area.
x1 X world coordinate of the location at the bottom right corner of the area.
y1 Y world coordinate of the location at the bottom right corner of the area.

Reimplemented from TdkDisplay.

void TdkMapDisplay::zoom ( double  factor  )  [virtual]

Zoom by a fixed factor maintaining the center location.

Parameters:
factor Zoom factor.

Reimplemented from TdkDisplay.

void TdkMapDisplay::zoom ( double  xc,
double  yc,
double  factor 
) [virtual]

Zoom by a fixed factor.

Parameters:
xc X world coordinate of the location to be centralized in the new zoom level.
yc Y world coordinate of the location to be centralized in the new zoom level.
factor Zoom factor.

Reimplemented from TdkDisplay.

void TdkMapDisplay::translateOrigin ( double  dx,
double  dy 
) [virtual]

Translates the origin of the display in some direction.

Parameters:
dx Origin's horizontal deslocation in world coordinates.
dy Origin's vertical deslocation in world coordinates.

void TdkMapDisplay::pan ( double  dx,
double  dy 
) [virtual]

Pan (drag) the map in some direction.

Parameters:
dx Horizontal deslocation in world coordinates.
dy Vertical deslocation in world coordinates.

Reimplemented from TdkDisplay.

void TdkMapDisplay::center ( double  x,
double  y 
) [virtual]

Centers the map around a given point.

Parameters:
x X coordinate of the point.
y Y coordinate of the point.

void TdkMapDisplay::centerX ( double  x  )  [virtual]

Centers horizontally the map around a given point.

Parameters:
x X coordinate of the point.

void TdkMapDisplay::centerY ( double  y  )  [virtual]

Centers vertically the map around a given point.

Parameters:
y Y coordinate of the point.

void TdkMapDisplay::draw (  )  [virtual]

Redraws the map (by getting all the information from the database again).

Reimplemented from TdkDisplay.

Reimplemented in TdkJNIMapDisplay.

bool TdkMapDisplay::drawObjects ( int  buffer = TdkCanvas::cbrBack  )  [virtual]

Returns true if any theme was loaded.

drawImageOk

void TdkMapDisplay::drawFrontObjects (  )  [virtual]

void TdkMapDisplay::drawGraphLegend (  )  [virtual]

void TdkMapDisplay::drawSelectedObjects (  )  [virtual]

void TdkMapDisplay::drawIdentifiedObjects (  )  [virtual]

void TdkMapDisplay::drawOver (  )  [virtual]

Redraws the map without erasing the current image displayed.

void TdkMapDisplay::refresh (  )  [virtual]

Puts in the canvas the image of the last drawn map.

Reimplemented from TdkDisplay.

void TdkMapDisplay::resize ( int  xmin,
int  ymin,
int  xmax,
int  ymax,
TdkResizeMethods  met = rsmPreserveScalePos 
) [virtual]

Change the drawble area of the canvas. Coordinates are defined in pixels.

Reimplemented from TdkDisplay.

double TdkMapDisplay::distanceMeters ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
) [virtual]

Calculates the distance between two given points.

Parameters:
xmin X world coordinate of point 1.
ymin Y world coordinate of point 1.
xmax X world coordinate of point 2.
ymax Y world coordinate of point 2.
Returns:
Distance between point 1 and point 2 in meters.

void TdkMapDisplay::handleVSEvent ( TdkEvent event  )  [protected, virtual]

Reimplemented from TdkDisplay.

void TdkMapDisplay::handleVSEvent ( TdkRedrawEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkRefreshEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkSelectObjectsEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkSelectObjectsGIDVectorEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkPickEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkRedrawSelectedObjectsEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkZoomAreaEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkSelectedObjectsBBoxEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkObjectIdentificationEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkClearObjectIdentificationEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVSEvent ( TdkThemeObjectsIdentificationEvent event  )  [protected, virtual]

void TdkMapDisplay::handleVOEvent ( TdkEvent event  )  [protected, virtual]

Reimplemented from TdkDisplay.

void TdkMapDisplay::handleVSEvent ( TdkViewportPolylineFeedbackEvent event  )  [protected, virtual]

void TdkMapDisplay::box ( bool  onlyVisible,
double &  xmin,
double &  ymin,
double &  xmax,
double &  ymax 
) [protected, virtual]

Computes the bounding box of the spatial data associated to the MapView.


The documentation for this class was generated from the following files:
Generated on Fri Jun 15 16:54:46 2007 for TDK by  doxygen 1.5.2